Example #1
0
func AllocPublicKey() PublicKey {
	return make([]byte, cryptobox.BoxPublicKeyBytes())
}
Example #2
0
func ScalarMultBase(pkOut []byte, skIn []byte) int {
	support.CheckSize(pkOut, cryptobox.BoxPublicKeyBytes(), "public key")
	support.CheckSize(skIn, cryptobox.BoxSecretKeyBytes(), "secret key")

	return int(C.crypto_scalarmult_base((*C.uchar)(&pkOut[0]), (*C.uchar)(&skIn[0])))
}