Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1. More...
Public Member Functions | |
SHA1 () | |
Construct null. More... | |
SHA1 (const std::string &) | |
Construct null and append initial std::string. More... | |
SHA1 (const char *) | |
Construct null and append initial string. More... | |
void | clear () |
Reset the hashed data before appending more. More... | |
SHA1 & | append (const char *data, size_t len) |
Append data for processing. More... | |
SHA1 & | append (const std::string &) |
Append string for processing. More... | |
SHA1 & | append (const char *str) |
Append string for processing. More... | |
bool | finalize () |
Finalized the calculations (normally not needed directly). More... | |
SHA1Digest | digest () const |
Calculate current digest from appended data. More... | |
bool | operator== (const SHA1 &) const |
Equality operator, compares digests. More... | |
bool | operator== (const SHA1Digest &) const |
Compare digest. More... | |
bool | operator== (const std::string &hexdigits) const |
Compare digest to (40-byte) text representation (eg, from sha1sum) More... | |
bool | operator== (const char *hexdigits) const |
Compare digest to (40-byte) text representation (eg, from sha1sum) More... | |
bool | operator!= (const SHA1 &) const |
Inequality operator, compares digests. More... | |
bool | operator!= (const SHA1Digest &) const |
Inequality operator, compare digest. More... | |
bool | operator!= (const std::string &hexdigits) const |
Inequality operator, compares digests. More... | |
bool | operator!= (const char *hexdigits) const |
Inequality operator, compare digest. More... | |
operator SHA1Digest () const | |
Convert to a SHA1Digest,. More... | |
Friends | |
Ostream & | operator<< (Ostream &, const SHA1 &) |
Output the digest. More... | |
Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.
Adapted from the gnulib implementation.
|
inline |
Construct null.
Definition at line 31 of file SHA1I.H.
References SHA1::clear().
|
inlineexplicit |
Construct null and append initial std::string.
Definition at line 37 of file SHA1I.H.
References SHA1::append(), and SHA1::clear().
|
inlineexplicit |
Construct null and append initial string.
Definition at line 44 of file SHA1I.H.
References SHA1::append(), and SHA1::clear().
void clear | ( | ) |
Reset the hashed data before appending more.
Definition at line 339 of file SHA1.C.
Referenced by SHA1::SHA1().
|
inline |
Append data for processing.
Definition at line 53 of file SHA1I.H.
Referenced by SHA1::SHA1(), and sha1streambuf::xsputn().
|
inline |
|
inline |
bool finalize | ( | ) |
Finalized the calculations (normally not needed directly).
Returns false if no bytes were passed for processing
Definition at line 354 of file SHA1.C.
Referenced by SHA1::digest().
Foam::SHA1Digest digest | ( | ) | const |
Calculate current digest from appended data.
Definition at line 393 of file SHA1.C.
References SHA1::finalize().
Referenced by SHA1::operator!=(), Foam::operator<<(), and SHA1::operator==().
|
inline |
Equality operator, compares digests.
Definition at line 79 of file SHA1I.H.
References SHA1::digest().
Referenced by SHA1::operator!=().
|
inline |
Compare digest.
Definition at line 85 of file SHA1I.H.
References SHA1::digest().
|
inline |
Compare digest to (40-byte) text representation (eg, from sha1sum)
An empty string is equivalent to "0000000000000000000000000000000000000000"
Definition at line 91 of file SHA1I.H.
References SHA1::digest().
|
inline |
Compare digest to (40-byte) text representation (eg, from sha1sum)
A null or empty string is equivalent to "0000000000000000000000000000000000000000"
Definition at line 97 of file SHA1I.H.
References SHA1::digest().
|
inline |
Inequality operator, compares digests.
Definition at line 103 of file SHA1I.H.
References SHA1::operator==().
|
inline |
Inequality operator, compare digest.
Definition at line 109 of file SHA1I.H.
References SHA1::operator==().
|
inline |
Inequality operator, compares digests.
Definition at line 115 of file SHA1I.H.
References SHA1::operator==().
|
inline |
Inequality operator, compare digest.
Definition at line 121 of file SHA1I.H.
References SHA1::digest(), and SHA1::operator==().
|
inline |
Convert to a SHA1Digest,.
calculate current digest from appended data