func (b *binary) toBytes() []byte {
	dataPtr := C.mongocrypt_binary_data(b.wrapped)  
	dataLen := C.mongocrypt_binary_len(b.wrapped)   
	return C.GoBytes(unsafe.Pointer(dataPtr), C.int(dataLen))
}
toBytes converts the given binary instance to []byte.
package mongocrypt
import "C"
import (
	"unsafe"
)
type binary struct {
	wrapped *C.mongocrypt_binary_t
}
func newBinary() *binary {
	return &binary{
		wrapped: C.mongocrypt_binary_new(),
	}
}
func newBinaryFromBytes(data []byte) *binary {
	if len(data) == 0 {
		return newBinary()
	}
	addr := (*C.uint8_t)(unsafe.Pointer(&data[0]))  
	dataLen := C.uint32_t(len(data))                
	return &binary{
		wrapped: C.mongocrypt_binary_new_from_data(addr, dataLen),
	}
}