Libraries
bignum
binary
bitmap
ble
bytes
core
crypto
adler32
aes
blake2
chacha20
checksum
cmac
crc
ec
hamming
hkdf
hmac
md5
rsa
sha
sha1
sha256
siphash
device
ec618
encoding
esp32
expect
fixed-point
flash
font
gpio
i2c
i2s
icons
io
line-wrap
log
math
monitor
net
pulse-counter
reader
reader-writer
rmt
serial
spi
statistics
system
tls
uart
uuid
writer
zlib
Library hkdf
To use this library in your code:
import crypto.hkdf
HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
See RFC 5869.
Functions
hkdf
--ikm/
ByteArray
--salt/
ByteArray
--info/
ByteArray
--size/
int
[hasher-creator]
->
ByteArray
Generic HKDF implementation.
The
hasher-creator
is a block that creates an HMAC object for a given key.
The
size
is the desired size of the output key in bytes.
hkdf-expand
--prk/
ByteArray
--info/
ByteArray
--size/
int
[hasher-creator]
->
ByteArray
HKDF-Expand step.
The
size
is the desired size of the output key in bytes.
hkdf-extract
--ikm/
ByteArray
--salt/
ByteArray
[hasher-creator]
->
ByteArray
HKDF-Extract step.
hkdf-sha256
--ikm/
ByteArray
--salt/
ByteArray
=
null
--info/
ByteArray
=
null
--size/
int
->
ByteArray
Derives a key using HKDF-SHA256.
The
ikm
is the input keying material.
The
salt
is optional.
The
info
is optional context information.
The
size
is the desired size of the output key in bytes.