![]() |
Kea 3.0.0
|
Botan implementation of HMAC. More...
Public Member Functions | |
HMACImpl (const void *secret, size_t secret_len, const HashAlgorithm hash_algorithm) | |
Constructor from a secret and a hash algorithm. | |
HMACImpl (const void *secret, size_t secret_len, const HashAlgorithm hash_algorithm) | |
Constructor from a secret and a hash algorithm. | |
~HMACImpl () | |
Destructor. | |
~HMACImpl ()=default | |
Destructor. | |
HashAlgorithm | getHashAlgorithm () const |
Returns the HashAlgorithm of the object. | |
HashAlgorithm | getHashAlgorithm () const |
Returns the HashAlgorithm of the object. | |
size_t | getOutputLength () const |
Returns the output size of the digest. | |
size_t | getOutputLength () const |
Returns the output size of the digest. | |
void | sign (isc::util::OutputBuffer &result, size_t len) |
Calculate the final signature. | |
void | sign (isc::util::OutputBuffer &result, size_t len) |
Calculate the final signature. | |
std::vector< uint8_t > | sign (size_t len) |
Calculate the final signature. | |
std::vector< uint8_t > | sign (size_t len) |
Calculate the final signature. | |
void | sign (void *result, size_t len) |
Calculate the final signature. | |
void | sign (void *result, size_t len) |
Calculate the final signature. | |
void | update (const void *data, const size_t len) |
Add data to digest. | |
void | update (const void *data, const size_t len) |
Add data to digest. | |
bool | verify (const void *sig, size_t len) |
Verify an existing signature. | |
bool | verify (const void *sig, size_t len) |
Verify an existing signature. | |
Botan implementation of HMAC.
OpenSSL implementation of HMAC.
Each method is the counterpart of the HMAC corresponding method.
Definition at line 45 of file botan_hmac.cc.
|
inlineexplicit |
Constructor from a secret and a hash algorithm.
See constructor of the isc::cryptolink::HMAC class for details.
secret | The secret to sign with |
secret_len | The length of the secret |
hash_algorithm | The hash algorithm |
Definition at line 54 of file botan_hmac.cc.
References isc::cryptolink::btn::getHmacAlgorithmName(), isc_throw, and isc::Exception::what().
|
default |
Destructor.
|
inlineexplicit |
Constructor from a secret and a hash algorithm.
See constructor of the isc::cryptolink::HMAC class for details.
secret | The secret to sign with |
secret_len | The length of the secret |
hash_algorithm | The hash algorithm |
Definition at line 34 of file openssl_hmac.cc.
References isc::cryptolink::ossl::getHashAlgorithm(), and isc_throw.
|
inline |
Destructor.
Definition at line 71 of file openssl_hmac.cc.
|
inline |
Returns the HashAlgorithm of the object.
Definition at line 88 of file botan_hmac.cc.
|
inline |
Returns the HashAlgorithm of the object.
Definition at line 79 of file openssl_hmac.cc.
|
inline |
|
inline |
Returns the output size of the digest.
Definition at line 86 of file openssl_hmac.cc.
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 113 of file botan_hmac.cc.
References isc_throw, isc::Exception::what(), and isc::util::OutputBuffer::writeData().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 106 of file openssl_hmac.cc.
References isc::cryptolink::digest(), getOutputLength(), isc_throw, and isc::util::OutputBuffer::writeData().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 145 of file botan_hmac.cc.
References isc_throw, and isc::Exception::what().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 144 of file openssl_hmac.cc.
References isc::cryptolink::digest(), getOutputLength(), and isc_throw.
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 129 of file botan_hmac.cc.
References getOutputLength(), isc_throw, and isc::Exception::what().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 125 of file openssl_hmac.cc.
References isc::cryptolink::digest(), getOutputLength(), and isc_throw.
|
inline |
Add data to digest.
See isc::cryptolink::HMAC::update() for details.
Definition at line 102 of file botan_hmac.cc.
References isc_throw, and isc::Exception::what().
|
inline |
Add data to digest.
See isc::cryptolink::HMAC::update() for details.
Definition at line 93 of file openssl_hmac.cc.
References isc_throw.
|
inline |
Verify an existing signature.
See isc::cryptolink::HMAC::verify() for details.
Definition at line 164 of file botan_hmac.cc.
References getOutputLength(), isc_throw, and isc::Exception::what().
|
inline |
Verify an existing signature.
See isc::cryptolink::HMAC::verify() for details.
Definition at line 163 of file openssl_hmac.cc.
References getOutputLength(), and isc_throw.