tuweni / org.apache.tuweni.crypto.sodium / DiffieHelman / SecretKey / fromBytes

fromBytes

static fun fromBytes(bytes: Bytes!): SecretKey! (source)

Create a SecretKey from an array of bytes.

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

Parameters

bytes - Bytes!: The bytes for the secret key.

Return
SecretKey!: A secret key.

static fun fromBytes(bytes: ByteArray!): SecretKey! (source)

Create a SecretKey from an array of bytes.

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

Parameters

bytes - ByteArray!: The bytes for the secret key.

Return
SecretKey!: A secret key.