35 const uint8_t secret[],
39 const uint8_t label[],
40 size_t label_len)
const {
45 const size_t blocks_required = key_len / 20;
47 if(blocks_required >= 0xFFFFFFFE) {
58 in.reserve(salt_len + label_len);
59 in += std::make_pair(label, label_len);
60 in += std::make_pair(salt, salt_len);
62 while(offset != key_len && counter) {
63 hash->update(secret, secret_len);
70 .encode(m_key_wrap_oid)
71 .raw_bytes(encode_x942_int(counter))
77 .raw_bytes(encode_x942_int(
static_cast<uint32_t
>(8 * key_len)))
84 const size_t copied = std::min(h.size(), key_len - offset);
85 copy_mem(&key[offset], h.data(), copied);
void kdf(uint8_t key[], size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override