E-MailRelay
Public Types | Static Public Member Functions | List of all members
G::HashState< N, U, S > Class Template Reference

Helper functions for representing the state of a hash function as a non-printable string. More...

#include <ghashstate.h>

Public Types

typedef U uint_type
 
typedef S size_type
 

Static Public Member Functions

static std::string encode (const uint_type *)
 Returns the hash state as a string, typically containing non-printing characters. More...
 
static std::string encode (const uint_type *, size_type n)
 Returns the hash state as a string that also encodes the data size. More...
 
static void decode (const std::string &, uint_type *, size_type &)
 Converts an encode()d string back into a hash state of N integers and a data size returned by reference. More...
 

Detailed Description

template<unsigned int N, typename U, typename S>
class G::HashState< N, U, S >

Helper functions for representing the state of a hash function as a non-printable string.

The hash state must be an array of 'N/4' 32-bit values, with encoded strings being N or N+4 characters.

See also
G::Hash::printable

Definition at line 29 of file ghashstate.h.

Member Function Documentation

template<unsigned int N, typename U , typename S >
void G::HashState< N, U, S >::decode ( const std::string &  str,
uint_type *  state_out,
size_type &  n_out 
)
static

Converts an encode()d string back into a hash state of N integers and a data size returned by reference.

Definition at line 91 of file ghashstate.h.

template<unsigned int N, typename U , typename S >
std::string G::HashState< N, U, S >::encode ( const uint_type *  state)
static

Returns the hash state as a string, typically containing non-printing characters.

Definition at line 68 of file ghashstate.h.

template<unsigned int N, typename U , typename S >
std::string G::HashState< N, U, S >::encode ( const uint_type *  state,
size_type  n 
)
static

Returns the hash state as a string that also encodes the data size.

Definition at line 79 of file ghashstate.h.


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