cryptoKxKeypair static method
Implementation
static KeyPair cryptoKxKeypair() {
final _pk = calloc<Uint8>(cryptoKxPublickeybytes);
final _sk = calloc<Uint8>(cryptoKxSecretkeybytes);
try {
_cryptoKx.crypto_kx_keypair(_pk, _sk).mustSucceed('crypto_kx_keypair');
return KeyPair(
pk: _pk.toList(cryptoKxPublickeybytes),
sk: _sk.toList(cryptoKxSecretkeybytes));
} finally {
calloc.free(_pk);
calloc.free(_sk);
}
}