#include <MessageDigest.h>
Simple MessageDigest -service.
Instances are not thread-safe.
Construction may throw tenduke::crypto::CryptoException.
|
enum | Algorithm { NONE
, SHA256
} |
| Supported algorithms.
|
|
|
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.
|
|
◆ algorithmToString()
Converts algorithm to string representation.
- Parameters
-
- Returns
- -
◆ digest()
◆ digestTo()
virtual void tenduke::crypto::MessageDigest::digestTo |
( |
unsigned char * |
messageDigest | ) |
|
|
pure virtual |
◆ length()
virtual std::size_t tenduke::crypto::MessageDigest::length |
( |
| ) |
const |
|
pure virtual |
◆ stringToAlgorithm() [1/2]
xdcrypto::MessageDigest::Algorithm tenduke::crypto::MessageDigest::stringToAlgorithm |
( |
const char * |
string | ) |
|
|
static |
Converts string to algorithm.
- Parameters
-
- Returns
- -
◆ stringToAlgorithm() [2/2]
xdcrypto::MessageDigest::Algorithm tenduke::crypto::MessageDigest::stringToAlgorithm |
( |
const std::string & |
string | ) |
|
|
static |
Converts string to algorithm.
- Parameters
-
- Returns
- -
◆ update()
virtual MessageDigest * tenduke::crypto::MessageDigest::update |
( |
const unsigned char * |
message, |
|
|
std::size_t |
messageLength |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following files:
- core/core/src/crypto/MessageDigest.h
- core/core/src/crypto/MessageDigest.cpp