class Nonce : Destroyable
(source)
A SecretBox nonce.
fun bytes(): Bytes |
|
fun bytesArray(): ByteArray |
|
fun destroy(): Unit |
|
fun equals(other: Any?): Boolean |
|
static fun fromBytes(bytes: Bytes): Nonce static fun fromBytes(bytes: ByteArray): Nonce
Create a Nonce from an array of bytes. The byte array must be of length |
|
fun hashCode(): Int |
|
fun increment(): Nonce
Increment this nonce. Note that this is not synchronized. If multiple threads are creating encrypted messages and incrementing this nonce, then external synchronization is required to ensure no two encrypt operations use the same nonce. |
|
static fun length(): Int
Obtain the length of the nonce in bytes (24). |
|
static fun random(): Nonce
Generate a random Nonce. |
|
static fun zero(): Nonce
Create a zero Nonce. |