crypto / net.consensys.cava.crypto.sodium / KeyExchange / SessionKey

SessionKey

class SessionKey (source)

A KeyExchange session key.

Functions

bytes

fun bytes(): Bytes

bytesArray

fun bytesArray(): ByteArray

equals

fun equals(other: Any?): Boolean

fromBytes

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

Create a SessionKey from an array of bytes.

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

hashCode

fun hashCode(): Int

length

static fun length(): Int

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