VMime
messageDigestFactory Class Reference

Public Member Functions

template<class E >
void registerAlgorithm (const string &name)
 
shared_ptr< messageDigestcreate (const string &name)
 
const std::vector< stringgetSupportedAlgorithms () const
 

Static Public Member Functions

static messageDigestFactorygetInstance ()
 

Detailed Description

Creates instances of message digest algorithms.

Member Function Documentation

shared_ptr< messageDigest > create ( const string name)

Create a new algorithm instance from its name.

Parameters
namealgorithm name (eg. "md5")
Returns
a new algorithm instance for the specified name
Exceptions
exceptions::no_digest_algorithm_availableif no algorithm is registered with this name

References stringUtils::toLower().

messageDigestFactory * getInstance ( )
static
const std::vector< string > getSupportedAlgorithms ( ) const

Return a list of supported digest algorithms.

Returns
list of supported digest algorithms
void registerAlgorithm ( const string name)

Register a new digest algorithm by its name.

Parameters
namealgorithm name

References stringUtils::toLower().


The documentation for this class was generated from the following files: