salsaBoxDecrypt method
BuBytes?
salsaBoxDecrypt(
- List<
int> nonce, - List<
int> sealed, { - required List<
int> peerPublicKey, - required List<
int> secretKey,
override
NaCl crypto_box_open_easy detached decrypt with explicit 24-byte
nonce. Returns plaintext, or null on authentication failure.
Throws on invalid key/nonce lengths (never on attacker ciphertext).
Implementation
@override
BuBytes? salsaBoxDecrypt(
List<int> nonce,
List<int> sealed, {
required List<int> peerPublicKey,
required List<int> secretKey,
}) {
ApiValidate.length(
nonce,
SalsaBox.nonceLength,
operation: "salsaBoxDecrypt",
name: "nonce",
);
ApiValidate.length(
peerPublicKey,
SalsaBox.keyLength,
operation: "salsaBoxDecrypt",
name: "peerPublicKey",
);
ApiValidate.length(
secretKey,
SalsaBox.keyLength,
operation: "salsaBoxDecrypt",
name: "secretKey",
);
return _inner.salsaBoxDecrypt(
nonce,
sealed,
peerPublicKey: peerPublicKey,
secretKey: secretKey,
);
}