crypto / org.apache.tuweni.crypto.sodium / KeyDerivation / MasterKey / fromBytes

fromBytes

static fun fromBytes(bytes: Bytes): MasterKey (source)

Create a MasterKey from an array of bytes.

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

Parameters

bytes - The bytes for the key.

Return
A key, based on the supplied bytes.

static fun fromBytes(bytes: ByteArray): MasterKey (source)

Create a MasterKey from an array of bytes.

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

Parameters

bytes - The bytes for the key.

Exceptions

UnsupportedOperationException - If key derivation support is not available.

Return
A key, based on the supplied bytes.