randomNonce static method

Uint8List randomNonce()

Generates a random nonce for use with the ChaCha20-Poly1305 construction.

Implementation

static Uint8List randomNonce() =>
    Sodium.randombytesBuf(Sodium.cryptoAeadChacha20poly1305Npubbytes);