This class provides description of HMAC helper methods.
More...
#include <hmac.hh>
|
| hmac (const hash_algorithms p_hash_algorithms) |
| Default constructor Create a new instance of the hmac class. More...
|
|
virtual | ~hmac () |
| Default destructor. More...
|
|
int | generate (const std::vector< unsigned char > p_buffer, const std::vector< unsigned char > p_secret_key, std::vector< unsigned char > &p_hmac) |
| Generate the HMAC of data using a secret key [in] p_buffer The data tobe hashed. More...
|
|
int | generate (const unsigned char *p_buffer, const size_t p_buffer_length, const unsigned char *p_secret_key, const size_t p_secret_key_length, std::vector< unsigned char > &p_hmac) |
| Generate the HMAC of data using a secret key. More...
|
|
This class provides description of HMAC helper methods.
◆ hmac()
Default constructor Create a new instance of the hmac class.
- Parameters
-
[in] | p_hash_algorithms | The hash algorithm to be used to compute the HMAC |
◆ ~hmac()
◆ generate() [1/2]
int hmac::generate |
( |
const std::vector< unsigned char > |
p_buffer, |
|
|
const std::vector< unsigned char > |
p_secret_key, |
|
|
std::vector< unsigned char > & |
p_hmac |
|
) |
| |
|
inline |
Generate the HMAC of data using a secret key [in] p_buffer The data tobe hashed.
- Parameters
-
[in] | p_secret_key | The secret key to be used to generate the HMAC |
[out] | p_hmac | The HMAC value based of the provided data |
- Returns
- 0 on success, -1 otherwise
◆ generate() [2/2]
int hmac::generate |
( |
const unsigned char * |
p_buffer, |
|
|
const size_t |
p_buffer_length, |
|
|
const unsigned char * |
p_secret_key, |
|
|
const size_t |
p_secret_key_length, |
|
|
std::vector< unsigned char > & |
p_hmac |
|
) |
| |
|
inline |
Generate the HMAC of data using a secret key.
- Parameters
-
[in] | p_buffer | The data to be hashed |
[in] | p_buffer_length | The size of the data |
[in] | p_secret_key | The secret key to be used to generate the HMAC |
[in] | p_secret_key_length | The size of the secret key |
[out] | p_hmac | The HMAC value based of the provided data |
- Returns
- 0 on success, -1 otherwise
◆ _ctx
◆ _hash_algorithms
The documentation for this class was generated from the following file:
- /home/vagrant/TriesAndDelete/etsi_its/framework/include/hmac.hh