deriveKey

fun deriveKey(algorithm: Algorithm, ikm: ByteArray, salt: ByteArray?, info: ByteArray, length: Int): ByteArray

Derives a symmetric encryption key according to HKDF as defined by RFC 5869.

Return

output keying material of length octets.

Parameters

algorithm

the KDF algorithm to use e.g. Algorithm.HMAC_SHA256.

ikm

input key material.

salt

optional salt value (a non-secret random value).

info

context and application specific information (can be zero-length).

length

length of output keying material in octets.