extract

fun extract(algorithm: Algorithm, ikm: ByteArray, salt: ByteArray?): ByteArray

The "extract" part of HKDF.

If null is passed for the salt parameter, an array the same length as the hash function for algorithm is used, with all entries set to zero.

Return

a pseudorandom key, the same length as the hash function for algorithm.

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).