crypto / org.apache.tuweni.crypto.sodium / XChaCha20Poly1305 / Nonce / random

random

static fun random(): Nonce (source)

Generate a random Nonce.

Exceptions

UnsupportedOperationException - If XChaCha20Poly1305 support is not available.

Return
A randomly generated nonce.