VMime
messageDigestFactory Class Reference

#include <messageDigestFactory.hpp>

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 messageDigestFactory * getInstance ()

Detailed Description

Creates instances of message digest algorithms.

Member Function Documentation

◆ create()

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 create(), and stringUtils::toLower().

Referenced by create().

◆ getInstance()

messageDigestFactory * getInstance ( )
static

◆ getSupportedAlgorithms()

const std::vector< string > getSupportedAlgorithms ( ) const

Return a list of supported digest algorithms.

Returns
list of supported digest algorithms

◆ registerAlgorithm()

template<class E>
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: