crypto / net.consensys.cava.crypto.sodium / Box / SecretKey

SecretKey

class SecretKey : Destroyable (source)

A Box secret key.

Functions

bytes

fun bytes(): Bytes

bytesArray

fun bytesArray(): ByteArray

destroy

fun destroy(): Unit

equals

fun equals(other: Any?): Boolean

fromBytes

static fun fromBytes(bytes: Bytes): SecretKey
static fun fromBytes(bytes: ByteArray): SecretKey

Create a SecretKey from an array of bytes.

The byte array must be of length #length().

hashCode

fun hashCode(): Int

isDestroyed

fun isDestroyed(): Boolean

length

static fun length(): Int

Obtain the length of the key in bytes (32).