Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1. More...
#include <OpenFOAM/SHA1.H>
Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.
Adapted from the gnulib implementation.
Definition at line 69 of file SHA1.H.
Public Member Functions | |
SHA1 () | |
Construct null.
| |
SHA1 (const std::string &) | |
Construct and append initial std::string.
| |
SHA1 (const char *) | |
Construct and append initial string.
| |
void | clear () |
Reset the hashed data before appending more.
| |
SHA1 & | append (const char *data, size_t len) |
Append data for processing.
| |
SHA1 & | append (const std::string &) |
Append string for processing.
| |
SHA1 & | append (const char *str) |
Append string for processing.
| |
bool | finalize () |
Finalized the calculations (normally not needed directly).
| |
SHA1Digest | digest () const |
Calculate current digest from appended data.
| |
bool | operator== (const SHA1Digest &) const |
Equality operator.
| |
bool | operator!= (const SHA1Digest &) const |
Inequality operator.
| |
bool | operator== (const SHA1 &) const |
Equality operator.
| |
bool | operator!= (const SHA1 &) const |
Inequality operator.
| |
operator SHA1Digest () const | |
Convert to a digest, calculate current digest from appended data.
| |
Friends | |
Ostream & | operator<< (Ostream &, const SHA1 &) |
SHA1 | ( | ) | [inline]
|
SHA1 | ( | const std::string & | str ) | [inline, explicit]
|
SHA1 | ( | const char * | str ) | [inline, explicit]
|
void clear | ( | ) |
Reset the hashed data before appending more.
Definition at line 359 of file SHA1.C.
Referenced by OSHA1stream::rewind(), and SHA1::SHA1().
Foam::SHA1 & append | ( | const char * | data, |
size_t | len | ||
) | [inline]
|
Append data for processing.
Definition at line 56 of file SHA1I.H.
Referenced by sha1streambuf::xsputn().
Foam::SHA1 & append | ( | const std::string & | str ) | [inline]
|
Foam::SHA1 & append | ( | const char * | str ) | [inline]
|
bool finalize | ( | ) |
Finalized the calculations (normally not needed directly).
Returns false if no bytes were passed for processing
Definition at line 374 of file SHA1.C.
Referenced by SHA1::digest().
Foam::SHA1Digest digest | ( | ) | const |
Calculate current digest from appended data.
Definition at line 413 of file SHA1.C.
References SHA1::finalize().
Referenced by OSHA1stream::digest(), SHA1::operator!=(), Foam::operator<<(), and SHA1::operator==().
bool operator== | ( | const SHA1Digest & | rhs ) | const [inline]
|
bool operator!= | ( | const SHA1Digest & | rhs ) | const [inline]
|
bool operator== | ( | const SHA1 & | rhs ) | const [inline]
|
bool operator!= | ( | const SHA1 & | rhs ) | const [inline]
|
operator SHA1Digest | ( | ) | const [inline]
|
Convert to a digest, calculate current digest from appended data.