|
10Duke Enterprise C++ SDK
|
#include <MessageDigest.h>
Simple MessageDigest-service: E.g.
a cryptographic hash function, MAC, or message signature.
Instances are not thread-safe.
Construction may throw tenduke::crypto::CryptoException.
Public Member Functions | |
| virtual std::size_t | length () const =0 |
| Returns length (in bytes) of the resulting digest. | |
| virtual MessageDigest * | update (const unsigned char *message, std::size_t messageLength)=0 |
| Updates the digest. | |
| virtual void | digestTo (unsigned char *messageDigest)=0 |
| Computes the digest to pre-allocated buffer. | |
| virtual std::unique_ptr< tenduke::utl::BinaryData > | digest ()=0 |
| Computes the digest. | |
|
pure virtual |
Computes the digest.
| tenduke::crypto::CryptoException | on error |
Implemented in LibcryptoHash, tenduke::crypto::libcrypto::LibcryptoHash, tenduke::crypto::win::cng::WinCNGHash, and WinCNGHash.
|
pure virtual |
Computes the digest to pre-allocated buffer.
| messageDigest | the computed digest is placed here (needs to proper size, use MessageDigest::length()). |
| tenduke::crypto::CryptoException | on error |
Implemented in LibcryptoHash, tenduke::crypto::libcrypto::LibcryptoHash, tenduke::crypto::win::cng::WinCNGHash, and WinCNGHash.
|
pure virtual |
Returns length (in bytes) of the resulting digest.
Implemented in LibcryptoHash, tenduke::crypto::libcrypto::LibcryptoHash, tenduke::crypto::win::cng::WinCNGHash, and WinCNGHash.
|
pure virtual |
Updates the digest.
| message | - |
| messageLength | - |
| tenduke::crypto::CryptoException | on error |
Implemented in LibcryptoHash, tenduke::crypto::libcrypto::LibcryptoHash, tenduke::crypto::win::cng::WinCNGHash, and WinCNGHash.