|
CppCMS
|
This object calculates the HMAC signature for the input data. More...
#include <cppcms/crypto.h>
Public Member Functions | |
| hmac (std::unique_ptr< message_digest > digest, key const &k) | |
| hmac (std::string const &name, key const &k) | |
| unsigned | digest_size () const |
| void | append (void const *ptr, size_t size) |
| void | readout (void *ptr) |
This object calculates the HMAC signature for the input data.
| cppcms::crypto::hmac::hmac | ( | std::unique_ptr< message_digest > | digest, |
| key const & | k | ||
| ) |
Create hmac that uses given digest algorithm and a binary key - key
| cppcms::crypto::hmac::hmac | ( | std::string const & | name, |
| key const & | k | ||
| ) |
Create hmac that uses message digest algorithm called name and use a binary key - key
| void cppcms::crypto::hmac::append | ( | void const * | ptr, |
| size_t | size | ||
| ) |
Add data for signing
| unsigned cppcms::crypto::hmac::digest_size | ( | ) | const |
Get the size of the signtature
| void cppcms::crypto::hmac::readout | ( | void * | ptr | ) |
Get the signature for all the data, after calling this function the state of the hmac is reset and it can be used for signing again
Note: provided buffer must be digest_size() bytes long.
1.8.11