randomNonce static method
Generates a random nonce for use in a crypto box.
- Throws: AskarKeyException if the nonce generation fails.
Implementation
static Uint8List randomNonce() {
try {
return askarKeyCryptoBoxRandomNonce().getValueOrException();
} catch (e) {
throw AskarKeyException('Failed to generate random nonce for crypto box: $e');
}
}