- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Static Public Member Functions | List of all members
G::Md5 Class Reference

MD5 class. More...

`#include <gmd5.h>`

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

## Static Public Member Functions
static std::string | digest (const std::string &input)
| Creates an MD5 digest. More...
static std::string | digest (const std::string &input_1, const std::string &input_2)
| An overload which processes two input strings. More...
static std::string | printable (const std::string &input)
| Converts a binary string into a printable form, using a lowercase hexadecimal encoding. More...
static std::string | hmac (const std::string &key, const std::string &input)
| Computes a Hashed Message Authentication Code using MD5 as the hash function. More...
static std::string | hmac (const std::string &masked_key, const std::string &input, Masked)
| An hmac() overload using a masked key. More...
static std::string | mask (const std::string &key)
| Masks an HMAC key so that it can be stored more safely. 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 173 of file gmd5_native.cpp.

Referenced by GAuth::SaslClientImp::digest(), and GAuth::SaslServerBasicImp::digest().

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 178 of file gmd5_native.cpp.

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 167 of file gmd5_native.cpp.

Referenced by GAuth::SaslClientImp::cramDigest(), and GAuth::SaslServerBasicImp::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 151 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 137 of file gmd5_native.cpp.

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 193 of file gmd5_native.cpp.

References G_ASSERT.

Referenced by GAuth::SaslClientImp::cramDigest(), GAuth::SaslServerBasicImp::cramDigest(), GAuth::SaslClientImp::digest(), and GAuth::SaslServerBasicImp::digest().

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

- gmd5.h
- gmd5_native.cpp