this class provides an API to calculate various cryptographic hash functions
More...
#include <cppcms/crypto.h>
this class provides an API to calculate various cryptographic hash functions
virtual void cppcms::crypto::message_digest::append |
( |
void const * |
ptr, |
|
|
size_t |
size |
|
) |
| |
|
pure virtual |
Add more data of size bytes for processing
virtual unsigned cppcms::crypto::message_digest::block_size |
( |
| ) |
const |
|
pure virtual |
Get processing block size, returns 64 or 128, used mostly for correct HMAC calculations
virtual message_digest* cppcms::crypto::message_digest::clone |
( |
| ) |
const |
|
pure virtual |
Make a polymorphic copy of this object, note the state of copied object is reset to initial
static std::auto_ptr<message_digest> cppcms::crypto::message_digest::create_by_name |
( |
std::string const & |
name | ) |
|
|
static |
Create message digest by name, more then sha1 and md5 may be supported, if CppCMS is compiled with cryptography library like libgcrypt or openssl
virtual unsigned cppcms::crypto::message_digest::digest_size |
( |
| ) |
const |
|
pure virtual |
Get the size of message digest, for example for MD5 it is 16, for SHA1 it is 20
static std::auto_ptr<message_digest> cppcms::crypto::message_digest::md5 |
( |
| ) |
|
|
static |
Create MD5 message digest
virtual char const* cppcms::crypto::message_digest::name |
( |
| ) |
const |
|
pure virtual |
Get the name of the hash function
virtual void cppcms::crypto::message_digest::readout |
( |
void * |
ptr | ) |
|
|
pure virtual |
Read the message digest for the data and reset it into initial state, provided buffer must be digest_size() bytes
static std::auto_ptr<message_digest> cppcms::crypto::message_digest::sha1 |
( |
| ) |
|
|
static |
Create SHA1 message digest
The documentation for this class was generated from the following file: