G::Md5 Class Reference

MD5 class. More...

#include <gmd5.h>

List of all members.

Static Public Member Functions

static std::string digest (const std::string &input)
 Creates an MD5 digest.
static std::string digest (const std::string &input_1, const std::string &input_2)
 An overload which processes two input strings.
static std::string printable (const std::string &input)
 Converts a binary string into a printable form, using a lowercase hexadecimal encoding.
static std::string hmac (const std::string &key, const std::string &input)
 Computes a Hashed Message Authentication Code using MD5 as the hash function.
static std::string hmac (const std::string &masked_key, const std::string &input, Masked)
 An hmac() overload using a masked key.
static std::string mask (const std::string &key)
 Masks an HMAC key so that it can be stored more safely.

Classes

struct  Masked
 An overload discriminator for G::Md5::hmac(). More...


Detailed Description

MD5 class.

Definition at line 37 of file gmd5.h.


Member Function Documentation

std::string G::Md5::digest ( const std::string &  input  )  [static]

Creates an MD5 digest.

The resulting string is not generally printable and may have embedded NULs.

Definition at line 144 of file gmd5_native.cpp.

Referenced by GSmtp::SaslServerImp::digest(), digest(), and hmac().

std::string G::Md5::digest ( const std::string &  input_1,
const std::string &  input_2 
) [static]

An overload which processes two input strings.

Definition at line 149 of file gmd5_native.cpp.

References digest().

std::string G::Md5::printable ( const std::string &  input  )  [static]

Converts a binary string into a printable form, using a lowercase hexadecimal encoding.

See also RFC2095.

Definition at line 164 of file gmd5_native.cpp.

References G_ASSERT.

Referenced by GSmtp::SaslServerImp::cramDigest(), and GSmtp::SaslServerImp::digest().

std::string G::Md5::hmac ( const std::string &  key,
const std::string &  input 
) [static]

Computes a Hashed Message Authentication Code using MD5 as the hash function.

See also RFC2104 [HMAC-MD5].

Definition at line 138 of file gmd5_native.cpp.

References digest().

Referenced by GSmtp::SaslServerImp::cramDigest().

std::string G::Md5::hmac ( const std::string &  masked_key,
const std::string &  input,
Masked   
) [static]

An hmac() overload using a masked key.

Definition at line 122 of file gmd5_native.cpp.

References G::Str::splitIntoTokens().

std::string G::Md5::mask ( const std::string &  key  )  [static]

Masks an HMAC key so that it can be stored more safely.

Definition at line 108 of file gmd5_native.cpp.


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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5