// NewByteSliceFromBase64Str constructs and returns a new ByteSlice object based on
// the given base64 encoded []byte b.
NewByteSliceFromBase64Str constructs and returns a new ByteSlice object based on
the given base64 encoded []byte b.
// NewByteSliceFromBase64Str constructs and returns a new ByteSlice object based on // the given base64 encoded [] byte b .
func NewByteSliceFromBase64Str(s string) (ByteSlice, error) {
	tmp := make([]byte, base64.StdEncoding.DecodedLen(len(s)))
	n, err := base64.StdEncoding.Decode(tmp, []byte(s))
	if err != nil {
		return ByteSlice{}, err
	}
	return ByteSlice{
		ByteSlice: tmp[:n],
		Valid:     true,
	}, nil
}
func NewByteSliceFromBase64Str ( s string ) ( ByteSlice , error ) { tmp := make ( [ ] byte , base64 . StdEncoding . DecodedLen ( len ( s ) ) ) n , err := base64 . StdEncoding . Decode ( tmp , [ ] byte ( s ) ) if err != nil { return ByteSlice { } , err } return ByteSlice { ByteSlice : tmp [ : n ] , Valid : true , } , nil }
NewByteSliceFromBase64Str constructs and returns a new ByteSlice object based on
the given base64 encoded []byte b.
NewByteSliceFromBase64Str constructs and returns a new ByteSlice object based on the given base64 encoded [] byte b .