Kea
1.9.9-git
|
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. More... | |
HMACImpl (const void *secret, size_t secret_len, const HashAlgorithm hash_algorithm) | |
Constructor from a secret and a hash algorithm. More... | |
~HMACImpl () | |
Destructor. More... | |
~HMACImpl () | |
Destructor. More... | |
HashAlgorithm | getHashAlgorithm () const |
Returns the HashAlgorithm of the object. More... | |
HashAlgorithm | getHashAlgorithm () const |
Returns the HashAlgorithm of the object. More... | |
size_t | getOutputLength () const |
Returns the output size of the digest. More... | |
size_t | getOutputLength () const |
Returns the output size of the digest. More... | |
void | sign (isc::util::OutputBuffer &result, size_t len) |
Calculate the final signature. More... | |
void | sign (void *result, size_t len) |
Calculate the final signature. More... | |
void | sign (isc::util::OutputBuffer &result, size_t len) |
Calculate the final signature. More... | |
std::vector< uint8_t > | sign (size_t len) |
Calculate the final signature. More... | |
void | sign (void *result, size_t len) |
Calculate the final signature. More... | |
std::vector< uint8_t > | sign (size_t len) |
Calculate the final signature. More... | |
void | update (const void *data, const size_t len) |
Add data to digest. More... | |
void | update (const void *data, const size_t len) |
Add data to digest. More... | |
bool | verify (const void *sig, size_t len) |
Verify an existing signature. More... | |
bool | verify (const void *sig, size_t len) |
Verify an existing signature. More... | |
Botan implementation of HMAC.
OpenSSL implementation of HMAC.
Each method is the counterpart of the HMAC corresponding method.
Definition at line 24 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 33 of file botan_hmac.cc.
References isc::cryptolink::btn::getHashAlgorithmName(), isc_throw, and isc::Exception::what().
|
inline |
Destructor.
Definition at line 85 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 36 of file openssl_hmac.cc.
References isc::cryptolink::ossl::getHashAlgorithm(), and isc_throw.
|
inline |
Destructor.
Definition at line 62 of file openssl_hmac.cc.
|
inline |
Returns the HashAlgorithm of the object.
Definition at line 70 of file openssl_hmac.cc.
|
inline |
Returns the HashAlgorithm of the object.
Definition at line 89 of file botan_hmac.cc.
Referenced by isc::cryptolink::HMAC::getHashAlgorithm().
|
inline |
Returns the output size of the digest.
Definition at line 77 of file openssl_hmac.cc.
References isc_throw.
|
inline |
Returns the output size of the digest.
Definition at line 96 of file botan_hmac.cc.
Referenced by isc::cryptolink::HMAC::getOutputLength(), sign(), and verify().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 99 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 114 of file botan_hmac.cc.
References isc_throw, isc::Exception::what(), and isc::util::OutputBuffer::writeData().
Referenced by isc::cryptolink::HMAC::sign().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 114 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 openssl_hmac.cc.
References isc::cryptolink::ossl::SecBuf< T >::begin(), isc::cryptolink::digest(), isc::cryptolink::ossl::SecBuf< T >::end(), getOutputLength(), isc_throw, and isc::cryptolink::ossl::SecBuf< T >::resize().
|
inline |
Calculate the final signature.
See isc::cryptolink::HMAC::sign() for details.
Definition at line 130 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 146 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 88 of file openssl_hmac.cc.
References isc_throw.
|
inline |
Add data to digest.
See isc::cryptolink::HMAC::update() for details.
Definition at line 103 of file botan_hmac.cc.
References isc_throw, and isc::Exception::what().
Referenced by isc::cryptolink::HMAC::update().
|
inline |
Verify an existing signature.
See isc::cryptolink::HMAC::verify() for details.
Definition at line 144 of file openssl_hmac.cc.
References isc::cryptolink::digest(), getOutputLength(), isc_throw, and isc::cryptolink::ossl::SecBuf< T >::same().
|
inline |
Verify an existing signature.
See isc::cryptolink::HMAC::verify() for details.
Definition at line 165 of file botan_hmac.cc.
References getOutputLength(), isc_throw, and isc::Exception::what().
Referenced by isc::cryptolink::HMAC::verify().