crypto / net.consensys.cava.crypto.sodium / XChaCha20Poly1305 / Nonce / random

random

static fun random(): Nonce (source)

Generate a new Nonce using a random generator.

Exceptions

UnsupportedOperationException - If XChaCha20Poly1305 support is not available.

Return
A randomly generated nonce.