Example #1
0
func AllocSecretKey() SecretKey {
	return make([]byte, cryptobox.BoxSecretKeyBytes())
}
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])))
}