E-MailRelay
|
Functions for representing the intermediate state of a hash function as a non-printable string. More...
#include <ghashstate.h>
Public Types | |
using | uint_type = U |
using | size_type = S |
Static Public Member Functions | |
static std::string | encode (const uint_type *) |
Returns the hash state as an N-character string of non-printing characters. More... | |
static std::string | encode (const uint_type *, size_type n) |
Returns the hash state as a string that also has the original data size as a four-character extension(). More... | |
static std::string | encode (uint_type hi, uint_type low, const uint_type *) |
An overload with a hi/low bit count. More... | |
static std::string | encode (uint_type hi, uint_type low, uint_type v0, uint_type v1, uint_type v2, uint_type v3, uint_type v4=0) |
An overload for N=16 or N=20 with broken-out values and a hi/low bit count. More... | |
static void | decode (const std::string &s, uint_type *values_out, size_type &size_out) |
Converts an encode()d string back into a hash state of N/4 integers and a data size returned by reference. More... | |
static void | decode (const std::string &, uint_type &size_hi_out, uint_type &size_low_out, uint_type *value_0, uint_type *value_1, uint_type *value_2, uint_type *value_3, uint_type *value_4=nullptr) |
An overload for N=16 or N=20 with broken-out values and hi/low bit count. More... | |
static void | decode (const std::string &, uint_type &size_hi_out, uint_type &size_low_out, uint_type *values_out) |
An overload for a hi/low bit count. More... | |
![]() | |
template<typename U > | |
static std::string | extension (U n) |
Returns the given data size as a four-character string. More... | |
Additional Inherited Members | |
![]() | |
template<typename U > | |
static void | convert_ (U n, std::string::iterator p) |
Encodes the given value into four characters. More... | |
Functions for representing the intermediate state of a hash function as a non-printable string.
The input is an array of 'N/4' 32-bit values. The output is a string of N non-printable characters, or N+4 characters if also including the data size. The 'U' type can be more than 32 bits wide but it should hold values of no more than 32 bits significance.
Definition at line 62 of file ghashstate.h.
using G::HashState< N, U, S >::size_type = S |
Definition at line 66 of file ghashstate.h.
using G::HashState< N, U, S >::uint_type = U |
Definition at line 65 of file ghashstate.h.
|
static |
An overload for N=16 or N=20 with broken-out values and hi/low bit count.
Definition at line 177 of file ghashstate.h.
|
static |
An overload for a hi/low bit count.
Definition at line 194 of file ghashstate.h.
|
static |
Converts an encode()d string back into a hash state of N/4 integers and a data size returned by reference.
The data size is returned as zero if the input string is only N characters long.
Definition at line 169 of file ghashstate.h.
|
static |
Returns the hash state as an N-character string of non-printing characters.
Definition at line 113 of file ghashstate.h.
|
static |
Returns the hash state as a string that also has the original data size as a four-character extension().
Definition at line 124 of file ghashstate.h.
|
static |
An overload with a hi/low bit count.
Definition at line 136 of file ghashstate.h.
|
static |
An overload for N=16 or N=20 with broken-out values and a hi/low bit count.
Definition at line 145 of file ghashstate.h.