Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1. More...
#include <SHA1.H>
Public Member Functions | |
| SHA1 () | |
| Default construct. | |
| SHA1 (const char *str) | |
| Default construct and append initial string content. | |
| SHA1 (const std::string &str) | |
| Default construct and append initial string content. | |
| void | clear () noexcept |
| Reset the hashed data before appending more. | |
| void | append (char c) |
| Append single character. | |
| void | append (const char *str) |
| Append string for processing. | |
| void | append (const char *data, size_t len) |
| Append data for processing. | |
| void | append (const std::string &str) |
| Append string for processing. | |
| void | append (const std::string &str, size_t pos, size_t len=std::string::npos) |
| Append substring for processing. | |
| bool | finalize () |
| Finalized the calculations (normally not needed directly). | |
| SHA1Digest | digest () const |
| Calculate digest from current data. | |
| std::string | str (const bool prefixed=false) const |
| The digest (40-byte) text representation, optionally with '_' prefix. | |
| Ostream & | write (Ostream &os, const bool prefixed=false) const |
| Write digest (40-byte) representation, optionally with '_' prefix. | |
| operator SHA1Digest () const | |
| Cast conversion to a SHA1Digest,. | |
| bool | operator== (const SHA1 &rhs) const |
| Equality operator, compares digests. | |
| bool | operator== (const SHA1Digest &dig) const |
| Compare digest. | |
| bool | operator== (const std::string &hexdigits) const |
| Compare digest to (40-byte) text representation (eg, from sha1sum). | |
| bool | operator== (const char *hexdigits) const |
| Compare digest to (40-byte) text representation (eg, from sha1sum). | |
| bool | operator!= (const SHA1 &) const |
| Inequality operator, compares digests. | |
| bool | operator!= (const SHA1Digest &) const |
| Inequality operator, compare digest. | |
| bool | operator!= (const std::string &hexdigits) const |
| Inequality operator, compares digests. | |
| bool | operator!= (const char *hexdigits) const |
| Inequality operator, compare digest. | |
Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.
Adapted from the gnulib implementation.
|
inline |
Default construct.
Definition at line 24 of file SHA1I.H.
References clear().
Referenced by digest(), operator SHA1Digest(), operator!=(), and operator==().


|
inlineexplicit |
|
inlineexplicit |
|
noexcept |
Reset the hashed data before appending more.
Definition at line 314 of file SHA1.C.
References Foam::noexcept.
Referenced by SHA1().

|
inline |
|
inline |
|
inline |
|
inline |
Append substring for processing.
Definition at line 73 of file SHA1I.H.
References Foam::pos(), and str().

| bool finalize | ( | ) |
|
inline |
Calculate digest from current data.
Definition at line 92 of file SHA1I.H.
References finalize(), and SHA1().
Referenced by operator==(), operator==(), operator==(), operator==(), str(), and write().


|
inline |
The digest (40-byte) text representation, optionally with '_' prefix.
Definition at line 114 of file SHA1I.H.
References digest().
Referenced by append(), append(), append(), codeStream::getFunction(), dynamicCode::setFilterContext(), SHA1(), SHA1(), and codedBase::updateLibrary().


|
inline |
Write digest (40-byte) representation, optionally with '_' prefix.
Definition at line 120 of file SHA1I.H.
References digest(), and os().
Referenced by Foam::operator<<().


|
inline |
Cast conversion to a SHA1Digest,.
calculates the digest from the current data
References Foam::rhs(), and SHA1().

|
inline |
Equality operator, compares digests.
Definition at line 134 of file SHA1I.H.
References digest(), Foam::rhs(), and SHA1().

|
inline |
|
inline |
|
inline |
|
inline |
Inequality operator, compares digests.
Definition at line 158 of file SHA1I.H.
References Foam::operator==(), Foam::rhs(), and SHA1().

|
inline |
Inequality operator, compare digest.
Definition at line 164 of file SHA1I.H.
References Foam::operator==(), and Foam::rhs().

|
inline |
Inequality operator, compares digests.
Definition at line 170 of file SHA1I.H.
References Foam::operator==().

|
inline |
Inequality operator, compare digest.
Definition at line 176 of file SHA1I.H.
References Foam::operator==().
