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

Nonce

class Nonce (source)

An AES256-GSM 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 (12).

static fun length(): Int

random

Generate a random Nonce.

static fun random(): Nonce!

zero

Create a zero Nonce.

static fun zero(): Nonce!