hkdf

expect fun hkdf(algorithm: Algorithm, ikm: ByteArray, salt: ByteArray?, info: ByteArray?, size: Int): ByteArray

Computes an HKDF.

Return

size pseudorandom bytes.

Parameters

ikm

the input keying material.

salt

optional salt. A possibly non-secret random value. If no salt is provided (ie. if salt has length 0) then an array of 0s of the same size as the hash digest is used as salt.

info

optional context and application specific information.

size

the length of the generated pseudorandom string in bytes. The maximal size is DigestSize, where DigestSize is the size of the underlying HMAC.

actual fun hkdf(algorithm: <Error class: unknown class>, ikm: ByteArray, salt: ByteArray?, info: ByteArray?, size: Int): ByteArray
actual fun hkdf(algorithm: Algorithm, ikm: ByteArray, salt: ByteArray?, info: ByteArray?, size: Int): ByteArray

Computes an HKDF.

Return

size pseudorandom bytes.

Parameters

ikm

the input keying material.

salt

optional salt. A possibly non-secret random value. If no salt is provided (ie. if salt has length 0) then an array of 0s of the same size as the hash digest is used as salt.

info

optional context and application specific information.

size

the length of the generated pseudorandom string in bytes. The maximal size is DigestSize, where DigestSize is the size of the underlying HMAC.