| 16 | { |
| 17 | template <class Hash> |
| 18 | void hmacVT(const uint8_t** msg, int* msg_len, int count, const uint8_t* key, int key_len, uint8_t* digest) |
| 19 | { |
| 20 | Crypto::HmacContext<Hash> hmac(Crypto::Secret(key, key_len)); |
| 21 | for(int i = 0; i < count; ++i) { |
| 22 | hmac.update(msg[i], msg_len[i]); |
| 23 | } |
| 24 | auto hash = hmac.getHash(); |
| 25 | memcpy(digest, hash.data(), hash.size()); |
| 26 | } |
| 27 | |
| 28 | } // namespace |
| 29 |