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

random

static fun random(): Key! (source)

Generate a new key using a random generator.

Exceptions

UnsupportedOperationException - If XChaCha20Poly1305 support is not available.

Return
Key!: A randomly generated key.