-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathhmac_utils.hpp
More file actions
483 lines (438 loc) · 24.4 KB
/
Copy pathhmac_utils.hpp
File metadata and controls
483 lines (438 loc) · 24.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
#ifndef _HMAC_UTILS_HPP_INCLUDED
#define _HMAC_UTILS_HPP_INCLUDED
#include "hmac.hpp"
#include <array>
#include <string>
#include <vector>
#ifndef HMAC_CPP_MAX_PBKDF2_ITERATIONS
#define HMAC_CPP_MAX_PBKDF2_ITERATIONS 1000000u
#endif
namespace hmac_cpp {
static constexpr uint32_t MAX_PBKDF2_ITERATIONS = HMAC_CPP_MAX_PBKDF2_ITERATIONS;
/// \brief Compares two byte arrays in constant time
/// \param a Pointer to first array
/// \param a_len Length of the first array
/// \param b Pointer to second array
/// \param b_len Length of the second array
/// \return true if both arrays are equal
bool constant_time_equals(const uint8_t* a, size_t a_len,
const uint8_t* b, size_t b_len);
inline bool constant_time_equals(const std::vector<uint8_t>& a,
const std::vector<uint8_t>& b) {
return constant_time_equals(a.data(), a.size(), b.data(), b.size());
}
inline bool constant_time_equals(const std::string &a, const std::string &b) {
return constant_time_equals(reinterpret_cast<const uint8_t*>(a.data()), a.size(),
reinterpret_cast<const uint8_t*>(b.data()), b.size());
}
/// \brief Hash choices for PBKDF2
enum class Pbkdf2Hash { Sha1, Sha256, Sha512 };
/// \brief Derives a key from a password using PBKDF2 (RFC 8018)
/// \param password_ptr Pointer to the password buffer
/// \param password_len Length of the password in bytes
/// \param salt_ptr Pointer to the salt buffer
/// \param salt_len Length of the salt in bytes
/// \param iterations Number of iterations, must be positive
/// \param dk_len Desired length of the derived key in bytes, must be positive
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512)
/// \return Derived key as a vector of bytes
std::vector<uint8_t> pbkdf2(
const void* password_ptr, size_t password_len,
const void* salt_ptr, size_t salt_len,
uint32_t iterations, size_t dk_len,
Pbkdf2Hash prf = Pbkdf2Hash::Sha256);
/// \brief Derives a key using PBKDF2 from vector-based password and salt
template<typename T>
inline std::vector<uint8_t> pbkdf2(
const std::vector<T>& password,
const std::vector<T>& salt,
uint32_t iterations, size_t dk_len,
Pbkdf2Hash prf = Pbkdf2Hash::Sha256) {
static_assert(std::is_same<T, char>::value || std::is_same<T, uint8_t>::value,
"pbkdf2(vector<T>) supports only char or uint8_t");
return pbkdf2(password.data(), password.size(),
salt.data(), salt.size(),
iterations, dk_len, prf);
}
/// \brief Derives a key using PBKDF2 from string-based password and salt
inline std::vector<uint8_t> pbkdf2(
const std::string& password,
const std::string& salt,
uint32_t iterations, size_t dk_len,
Pbkdf2Hash prf = Pbkdf2Hash::Sha256) {
return pbkdf2(password.data(), password.size(),
salt.data(), salt.size(),
iterations, dk_len, prf);
}
/// \brief Derives PBKDF2-HMAC-SHA256 into caller-provided buffer
/// \param password_ptr Pointer to the password buffer
/// \param password_len Length of the password in bytes
/// \param salt_ptr Pointer to the salt buffer
/// \param salt_len Length of the salt in bytes
/// \param iterations Number of iterations, must be positive
/// \param out_ptr Output buffer for derived key
/// \param dk_len Length of output buffer in bytes, must be positive
/// \return true on success, false on invalid parameters
bool pbkdf2_hmac_sha256(const void* password_ptr, size_t password_len,
const void* salt_ptr, size_t salt_len,
uint32_t iterations, uint8_t* out_ptr, size_t dk_len) noexcept;
template<size_t N>
inline bool pbkdf2_hmac_sha256(const std::string& password,
const std::string& salt,
uint32_t iterations,
std::array<uint8_t, N>& out) noexcept {
return pbkdf2_hmac_sha256(password.data(), password.size(),
salt.data(), salt.size(),
iterations, out.data(), out.size());
}
std::vector<uint8_t> pbkdf2_with_pepper(
const void* password_ptr, size_t password_len,
const void* salt_ptr, size_t salt_len,
const void* pepper_ptr, size_t pepper_len,
uint32_t iterations, size_t dk_len,
Pbkdf2Hash prf = Pbkdf2Hash::Sha256);
template<typename T>
inline std::vector<uint8_t> pbkdf2_with_pepper(
const std::vector<T>& password,
const std::vector<T>& salt,
const std::vector<T>& pepper,
uint32_t iterations, size_t dk_len,
Pbkdf2Hash prf = Pbkdf2Hash::Sha256) {
static_assert(std::is_same<T, char>::value || std::is_same<T, uint8_t>::value,
"pbkdf2_with_pepper(vector<T>) supports only char or uint8_t");
return pbkdf2_with_pepper(password.data(), password.size(),
salt.data(), salt.size(),
pepper.data(), pepper.size(),
iterations, dk_len, prf);
}
inline std::vector<uint8_t> pbkdf2_with_pepper(
const std::string& password,
const std::string& salt,
const std::string& pepper,
uint32_t iterations, size_t dk_len,
Pbkdf2Hash prf = Pbkdf2Hash::Sha256) {
return pbkdf2_with_pepper(password.data(), password.size(),
salt.data(), salt.size(),
pepper.data(), pepper.size(),
iterations, dk_len, prf);
}
std::vector<uint8_t> hkdf_extract_sha256(
const void* ikm_ptr, size_t ikm_len,
const void* salt_ptr, size_t salt_len);
inline std::vector<uint8_t> hkdf_extract_sha256(
const std::vector<uint8_t>& ikm,
const std::vector<uint8_t>& salt) {
return hkdf_extract_sha256(ikm.data(), ikm.size(), salt.data(), salt.size());
}
std::vector<uint8_t> hkdf_expand_sha256(
const void* prk_ptr, size_t prk_len,
const void* info_ptr, size_t info_len,
size_t L);
inline std::vector<uint8_t> hkdf_expand_sha256(
const std::vector<uint8_t>& prk,
const std::vector<uint8_t>& info,
size_t L) {
return hkdf_expand_sha256(prk.data(), prk.size(), info.data(), info.size(), L);
}
struct KeyIv {
std::array<uint8_t,32> key;
std::array<uint8_t,12> iv;
};
KeyIv hkdf_key_iv_256(const void* ikm_ptr, size_t ikm_len,
const void* salt_ptr, size_t salt_len,
const std::string& context);
inline KeyIv hkdf_key_iv_256(const std::vector<uint8_t>& ikm,
const std::vector<uint8_t>& salt,
const std::string& context) {
return hkdf_key_iv_256(ikm.data(), ikm.size(), salt.data(), salt.size(), context);
}
/// \brief Generates a time-based HMAC-SHA256 token
/// \param key Secret key used for HMAC
/// \param interval_sec Interval in seconds that defines token rotation. Must be positive. Default is 60 seconds
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA256
/// \return Hex-encoded HMAC-SHA256 of the rounded time value
/// \throws std::runtime_error if the system time cannot be retrieved
std::string generate_time_token(const std::string &key, int interval_sec = 60, TypeHash hash_type = TypeHash::SHA256);
/// \brief Validates a time-based HMAC-SHA256 token with ±1 interval tolerance
/// \param token Token received from the client
/// \param key Secret key used for HMAC
/// \param interval_sec Interval in seconds that defines token rotation. Must be positive. Default is 60 seconds
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA256
/// \return true if the token is valid within the ±1 interval range; false otherwise
/// \throws std::runtime_error if the system time cannot be retrieved
bool is_token_valid(const std::string &token, const std::string &key, int interval_sec = 60, TypeHash hash_type = TypeHash::SHA256);
/// \brief Generates a time-based HMAC-SHA256 token with fingerprint binding
/// \param key Secret key used for HMAC
/// \param fingerprint Unique client identifier (e.g., device ID or session hash)
/// \param interval_sec Interval in seconds that defines token rotation. Must be positive. Default is 60 seconds
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA256
/// \return Hex-encoded HMAC-SHA256 of the concatenated timestamp and fingerprint
/// \throws std::runtime_error if the system time cannot be retrieved
std::string generate_time_token(const std::string &key, const std::string &fingerprint, int interval_sec = 60, TypeHash hash_type = TypeHash::SHA256);
/// \brief Validates a fingerprint-bound HMAC-SHA256 token with ±1 interval tolerance
/// \param token Token received from the client
/// \param key Secret key used for HMAC
/// \param fingerprint Unique client identifier (e.g., device ID or session hash)
/// \param interval_sec Interval in seconds that defines token rotation. Must be positive. Default is 60 seconds
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA256
/// \return true if the token is valid within the ±1 interval range; false otherwise
/// \throws std::runtime_error if the system time cannot be retrieved
bool is_token_valid(const std::string &token, const std::string &key, const std::string &fingerprint, int interval_sec = 60, TypeHash hash_type = TypeHash::SHA256);
/// \brief Computes HOTP code based on HMAC as defined in RFC 4226
/// \param key_ptr Pointer to the secret key (raw byte buffer)
/// \param key_len Length of the secret key in bytes
/// \param counter 64-bit moving counter (monotonically increasing)
/// \param digits Desired number of digits in the OTP (typically 6–8, max 9)
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA1
/// \return One-Time Password (OTP) as an integer in the range [0, 10^digits)
int get_hotp_code(const void* key_ptr, size_t key_len, uint64_t counter, int digits = 6, TypeHash hash_type = TypeHash::SHA1);
/// \brief Computes HOTP code from a vector of bytes as key (RFC 4226)
/// \tparam T Must be either `char` or `uint8_t`
/// \param key Vector containing the secret key bytes
/// \param counter 64-bit moving counter (monotonically increasing)
/// \param digits Desired number of digits in the OTP (typically 6–8, max 9)
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA1
/// \return One-Time Password (OTP) as an integer in the range [0, 10^digits)
template<typename T>
inline int get_hotp_code(const std::vector<T>& key, uint64_t counter, int digits = 6, TypeHash hash_type = TypeHash::SHA1) {
static_assert(std::is_same<T, char>::value || std::is_same<T, uint8_t>::value,
"get_hotp_code(vector<T>) supports only char or uint8_t");
return get_hotp_code(key.data(), key.size(), counter, digits, hash_type);
}
/// \brief Computes HOTP code from a std::string key interpreted as raw bytes
/// \param key Secret key as a binary string (each character is a byte)
/// \param counter 64-bit moving counter (monotonically increasing)
/// \param digits Desired number of digits in the OTP (typically 6–8, max 9)
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512). Default is SHA1
/// \return One-Time Password (OTP) as an integer in the range [0, 10^digits)
inline int get_hotp_code(const std::string& key, uint64_t counter, int digits = 6, TypeHash hash_type = TypeHash::SHA1) {
return get_hotp_code(key.data(), key.size(), counter, digits, hash_type);
}
namespace detail {
/// \brief Computes HOTP code from a precomputed HMAC digest
/// \param hmac_result HMAC digest bytes
/// \param digits Desired number of digits in the OTP (1-9)
/// \return One-Time Password (OTP) as an integer
/// \throws std::runtime_error if the digest is too short for dynamic truncation
int hotp_from_digest(const std::vector<uint8_t>& hmac_result, int digits);
}
/// \brief Computes TOTP (Time-Based One-Time Password) code for a specific timestamp
/// Implements RFC 6238
/// \param key_ptr Pointer to the secret key
/// \param key_len Length of the key in bytes
/// \param timestamp UNIX timestamp in seconds (e.g., time since epoch UTC)
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the resulting OTP code (1 to 9, default: 6)
/// \param hash_type Hash function to use (SHA1, SHA256, SHA512; default: SHA1)
/// \return TOTP code as an integer
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
int get_totp_code_at(
const void* key_ptr,
size_t key_len,
uint64_t timestamp,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1);
/// \brief Computes TOTP code for a specific timestamp from a vector-based key
/// \tparam T Must be uint8_t or char
/// \param key Secret key as a vector
/// \param timestamp UNIX timestamp in seconds
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the resulting OTP code (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return TOTP code as an integer
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
template<typename T>
inline int get_totp_code_at(
const std::vector<T>& key,
uint64_t timestamp,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1) {
static_assert(std::is_same<T, char>::value || std::is_same<T, uint8_t>::value,
"get_totp_code_at(vector<T>) supports only char or uint8_t");
return get_totp_code_at(key.data(), key.size(), timestamp, period, digits, hash_type);
}
/// \brief Computes TOTP code for a specific timestamp from a string-based key
/// \param key Secret key as a binary string
/// \param timestamp UNIX timestamp in seconds
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the resulting OTP code (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return TOTP code as an integer
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
inline int get_totp_code_at(
const std::string& key,
uint64_t timestamp,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1) {
return get_totp_code_at(key.data(), key.size(), timestamp, period, digits, hash_type);
}
/// \brief Computes current TOTP code using system time (UTC).
/// \param key_ptr Pointer to secret key buffer.
/// \param key_len Length of the key in bytes.
/// \param period Time step in seconds (default: 30).
/// \param digits Number of digits in the resulting OTP code (default: 6).
/// \param hash_type Hash function to use (default: SHA1).
/// \return TOTP code as an integer.
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9].
/// \throws std::runtime_error if the system time cannot be retrieved.
int get_totp_code(
const void* key_ptr,
size_t key_len,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1);
/// \brief Computes current TOTP code from a vector-based key using system time (UTC)
/// \tparam T Must be uint8_t or char
/// \param key Secret key as a vector
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the resulting OTP code (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return TOTP code as an integer
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
/// \throws std::runtime_error if the system time cannot be retrieved
template<typename T>
inline int get_totp_code(const std::vector<T>& key, int period = 30, int digits = 6, TypeHash hash_type = TypeHash::SHA1) {
return get_totp_code(key.data(), key.size(), period, digits, hash_type);
}
/// \brief Computes current TOTP code from a string-based key using system time (UTC)
/// \param key Secret key as a binary string
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the resulting OTP code (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return TOTP code as an integer
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
/// \throws std::runtime_error if the system time cannot be retrieved
inline int get_totp_code(const std::string& key, int period = 30, int digits = 6, TypeHash hash_type = TypeHash::SHA1) {
return get_totp_code(key.data(), key.size(), period, digits, hash_type);
}
/// \brief Validates a TOTP token with ±1 time step tolerance (RFC 6238)
/// \param token OTP code to validate
/// \param key_ptr Pointer to the secret key buffer
/// \param key_len Length of the secret key in bytes
/// \param timestamp Unix timestamp in seconds (e.g., from std::time(nullptr))
/// \param period Time step in seconds (default: 30)
/// \param digits Expected number of digits in the OTP (default: 6)
/// \param hash_type Hash algorithm to use (SHA1, SHA256, SHA512). Default is SHA1
/// \return true if the token is valid within [-1, 0, +1] time step range; false otherwise.
/// The +1 step check is skipped when the computed counter equals
/// std::numeric_limits<uint64_t>::max().
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
bool is_totp_token_valid(
int token,
const void* key_ptr,
size_t key_len,
uint64_t timestamp,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1);
/// \brief Validates a TOTP token with ±1 time step tolerance
/// \tparam T Byte type: must be char or uint8_t
/// \param token OTP code to validate
/// \param key Secret key as a vector of bytes
/// \param timestamp Unix timestamp in seconds
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the OTP (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return true if the token is valid within [-1, 0, +1] time step range; false otherwise.
/// The +1 step check is skipped when the computed counter equals
/// std::numeric_limits<uint64_t>::max().
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
template<typename T>
inline bool is_totp_token_valid(
int token,
const std::vector<T>& key,
uint64_t timestamp,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1) {
static_assert(std::is_same<T, char>::value || std::is_same<T, uint8_t>::value,
"is_totp_token_valid(vector<T>) only supports vector<char> or vector<uint8_t>");
return is_totp_token_valid(token, key.data(), key.size(), timestamp, period, digits, hash_type);
}
/// \brief Validates a TOTP token with ±1 time step tolerance
/// \param token OTP code to validate
/// \param key Secret key as a binary string
/// \param timestamp Unix timestamp in seconds
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the OTP (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return true if the token is valid within [-1, 0, +1] time step range; false otherwise.
/// The +1 step check is skipped when the computed counter equals
/// std::numeric_limits<uint64_t>::max().
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
inline bool is_totp_token_valid(
int token,
const std::string& key,
uint64_t timestamp,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1) {
return is_totp_token_valid(token, key.data(), key.size(), timestamp, period, digits, hash_type);
}
/// \brief Validates a TOTP token with ±1 time step tolerance using current system time
/// \param token OTP code to validate
/// \param key_ptr Pointer to the secret key buffer
/// \param key_len Length of the secret key in bytes
/// \param period Time step in seconds (default: 30)
/// \param digits Expected number of digits in the OTP (default: 6)
/// \param hash_type Hash algorithm to use (default: SHA1)
/// \return true if the token is valid within [-1, 0, +1] time step range; false otherwise.
/// The +1 step check is skipped when the computed counter equals
/// std::numeric_limits<uint64_t>::max().
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
/// \throws std::runtime_error if the system time cannot be retrieved
bool is_totp_token_valid(
int token,
const void* key_ptr,
size_t key_len,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1);
/// \brief Validates a TOTP token with ±1 time step tolerance using current system time
/// \tparam T Byte type: must be char or uint8_t
/// \param token OTP code to validate
/// \param key Secret key as a vector of bytes
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the OTP (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return true if the token is valid within [-1, 0, +1] time step range; false otherwise.
/// The +1 step check is skipped when the computed counter equals
/// std::numeric_limits<uint64_t>::max().
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
/// \throws std::runtime_error if the system time cannot be retrieved
template<typename T>
inline bool is_totp_token_valid(
int token,
const std::vector<T>& key,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1) {
static_assert(std::is_same<T, char>::value || std::is_same<T, uint8_t>::value,
"is_totp_token_valid(vector<T>) only supports vector<char> or vector<uint8_t>");
return is_totp_token_valid(token, key.data(), key.size(), period, digits, hash_type);
}
/// \brief Validates a TOTP token with ±1 time step tolerance using current system time
/// \param token OTP code to validate
/// \param key Secret key as a binary string
/// \param period Time step in seconds (default: 30)
/// \param digits Number of digits in the OTP (default: 6)
/// \param hash_type Hash function to use (default: SHA1)
/// \return true if the token is valid within [-1, 0, +1] time step range; false otherwise.
/// The +1 step check is skipped when the computed counter equals
/// std::numeric_limits<uint64_t>::max().
/// \throws std::invalid_argument if period <= 0 or digits not in [1,9]
/// \throws std::runtime_error if the system time cannot be retrieved
inline bool is_totp_token_valid(
int token,
const std::string& key,
int period = 30,
int digits = 6,
TypeHash hash_type = TypeHash::SHA1) {
return is_totp_token_valid(token, key.data(), key.size(), period, digits, hash_type);
}
} // namespace hmac_cpp
namespace hmac = hmac_cpp;
#endif // _HMAC_UTILS_HPP_INCLUDED