tuweni / org.apache.tuweni.crypto.sodium / Box / Nonce

Nonce

class Nonce (source)

A Box nonce.

Functions

bytes

Provides the bytes of this nonce

fun bytes(): Bytes!

bytesArray

Provides the bytes of this nonce

fun bytesArray(): ByteArray!

equals

fun equals(other: Any?): Boolean

fromBytes

Create a Nonce from an array of bytes.

static fun fromBytes(bytes: Bytes!): Nonce!
static fun fromBytes(bytes: ByteArray!): Nonce!

hashCode

fun hashCode(): Int

increment

Increment this nonce.

fun increment(): Nonce!

length

Obtain the length of the nonce in bytes (24).

static fun length(): Int

random

Generate a random Nonce.

static fun random(): Nonce!

zero

Create a zero Nonce.

static fun zero(): Nonce!