|
10Duke Enterprise C++ SDK
|
#include <MessageDigest.h>
Simple MessageDigest -service.
Instances are not thread-safe.
Construction may throw tenduke::crypto::CryptoException.
Public Types | |
| enum | Algorithm { NONE , SHA256 } |
| Supported algorithms. | |
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. | |
Static Public Member Functions | |
| static std::string | algorithmToString (enum MessageDigest::Algorithm algorithm) |
| Converts algorithm to string representation. | |
| static enum MessageDigest::Algorithm | stringToAlgorithm (const std::string &string) |
| Converts string to algorithm. | |
| static enum MessageDigest::Algorithm | stringToAlgorithm (const char *string) |
| Converts string to algorithm. | |
|
static |
Converts algorithm to string representation.
| algorithm | - |
|
pure virtual |
Computes the digest.
| tenduke::crypto::CryptoException | on error |
|
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 |
|
pure virtual |
Returns length (in bytes) of the resulting digest.
|
static |
Converts string to algorithm.
| string | - |
|
static |
Converts string to algorithm.
| string | - |
|
pure virtual |
Updates the digest.
| message | - |
| messageLength | - |
| tenduke::crypto::CryptoException | on error |