示例#1
0
func AllocPublicKey() PublicKey {
	return make([]byte, cryptobox.BoxPublicKeyBytes())
}
示例#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])))
}