Generic OpenSSL hasher class, the base class for specific derivations.
More...
#include <wrap_openssl_evp.h>
|
typedef unsigned char | Unit |
| The basic unit of both input and output for the hasher. More...
|
|
typedef std::vector< Unit > | Digest |
| Type of output of the hasher. More...
|
|
|
| OpenSSL_EVP () |
| ctor must specify the algorithm More...
|
|
| ~OpenSSL_EVP () |
| this thing needs a dtor or it leaks More...
|
|
void | write (const void *data, unsigned long len) |
| Hash an array of bytes; len is the number of bytes. More...
|
|
template<typename T > |
void | put (const T &datum) |
| Hash a single primitive datum, using a "shallow read". More...
|
|
template<typename SeqIterator > |
void | write (SeqIterator begin, SeqIterator end) |
| Hash a container of primitive data via STL sequential iterators. More...
|
|
size_t | size () const |
| Return size of message digest. More...
|
|
Digest | copy_digest () |
| Return a copy of the message digest. More...
|
|
Unit | operator[] (size_t index) |
| Access one character of the message digest. More...
|
|
Digest::const_iterator | begin () |
| Return const iterator to start of message digest. More...
|
|
Digest::const_iterator | end () |
| Return const iterator to one-past-last of message digest. More...
|
|
bool | is_finalized () const |
| Return whether the hasher is finalized, i.e., can I write to it? More...
|
|
Generic OpenSSL hasher class, the base class for specific derivations.
- Exceptions
-
Type of output of the hasher.
The basic unit of both input and output for the hasher.
kjb::OpenSSL_EVP::OpenSSL_EVP |
( |
| ) |
|
|
inline |
ctor must specify the algorithm
OpenSSL provides helper functions to return the appropriate algorithm pointer, such as EVP_md5() and EVP_sha1().
The end user is encouraged to create a derived class for a specific algorithm: see class MD5 for an example.
kjb::OpenSSL_EVP::~OpenSSL_EVP |
( |
| ) |
|
|
inline |
this thing needs a dtor or it leaks
Digest::const_iterator kjb::OpenSSL_EVP::begin |
( |
| ) |
|
|
inline |
Return const iterator to start of message digest.
Digest kjb::OpenSSL_EVP::copy_digest |
( |
| ) |
|
|
inline |
Return a copy of the message digest.
Digest::const_iterator kjb::OpenSSL_EVP::end |
( |
| ) |
|
|
inline |
Return const iterator to one-past-last of message digest.
bool kjb::OpenSSL_EVP::is_finalized |
( |
| ) |
const |
|
inline |
Return whether the hasher is finalized, i.e., can I write to it?
Unit kjb::OpenSSL_EVP::operator[] |
( |
size_t |
index | ) |
|
|
inline |
Access one character of the message digest.
template<typename T >
void kjb::OpenSSL_EVP::put |
( |
const T & |
datum | ) |
|
|
inline |
Hash a single primitive datum, using a "shallow read".
size_t kjb::OpenSSL_EVP::size |
( |
| ) |
const |
|
inline |
Return size of message digest.
void kjb::OpenSSL_EVP::write |
( |
const void * |
data, |
|
|
unsigned long |
len |
|
) |
| |
|
inline |
Hash an array of bytes; len is the number of bytes.
This is the old-skool C paradigm for writing stuff.
template<typename SeqIterator >
void kjb::OpenSSL_EVP::write |
( |
SeqIterator |
begin, |
|
|
SeqIterator |
end |
|
) |
| |
|
inline |
Hash a container of primitive data via STL sequential iterators.
The documentation for this class was generated from the following files: