This namespace includes the functions needed to generate an HMAC value Using OpenSSL.
More...
|
| std::string | generate (const std::string &message, const std::array< uint64_t, 4 > &key, const size_t &rounds) |
| | Generate an HMAC for a message.
|
| |
|
|
unsigned char | md_value [EVP_MAX_MD_SIZE] |
| |
|
unsigned int | md_len = 0 |
| |
This namespace includes the functions needed to generate an HMAC value Using OpenSSL.
◆ generate()
| std::string hmac::generate |
( |
const std::string & | message, |
|
|
const std::array< uint64_t, 4 > & | key, |
|
|
const size_t & | rounds ) |
Generate an HMAC for a message.
- Parameters
-
| message | The string to compute the HMAC for. |
| key | The set of prime numbers to use as the key. |
| rounds | The amount of AES rounds (To determine key size) |
- Returns
- A string containing the HMAC value.
- Exceptions
-
| std::runtime_error | if the HMAC could not be generated. |
| std::runtime_error | if the round amount is invalid. |