17 const uint8_t secret[],
21 const uint8_t label[],
22 size_t label_len)
const {
27 const size_t blocks_required = key_len / m_hash->output_length();
29 if(blocks_required >= 0xFFFFFFFE) {
37 while(offset != key_len) {
38 m_hash->update(secret, secret_len);
39 m_hash->update_be(counter++);
40 m_hash->update(label, label_len);
41 m_hash->update(salt, salt_len);
44 const size_t added = std::min(h.size(), key_len - offset);
45 copy_mem(&key[offset], h.data(), added);
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