41#ifndef Foam_SHA1Digest_H
42#define Foam_SHA1Digest_H
67 std::array<unsigned char, 20> dig_;
76 unsigned char* data()
noexcept {
return dig_.data(); }
98 SHA1Digest(
const char* content, std::size_t len);
103 SHA1Digest(
const unsigned char* content, std::size_t len);
115 std::string
str(
const bool prefixed=
false)
const;
130 const unsigned char*
cdata() const
noexcept {
return dig_.data(); }
136 return reinterpret_cast<const char*
>(dig_.data());
144 return reinterpret_cast<char*
>(dig_.data());
163 bool operator==(
const std::string& hexdigits)
const;
175 return !(*
this ==
rhs);
179 bool operator!=(
const std::string& hexdigits)
const
181 return !(*
this == hexdigits);
187 return !(*
this == hexdigits);
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool operator!=(const SHA1Digest &rhs) const
Inequality operator.
char * data_bytes() noexcept
Raw digest char data (20 bytes) - non-const access. For consistency with other objects,...
std::string str(const bool prefixed=false) const
Return (40-byte) text representation, optionally with '_' prefix.
bool empty() const
Return true if the digest is empty (ie, all zero).
const unsigned char * cdata() const noexcept
Raw digest data (20 bytes) - const access.
SHA1Digest()
Default construct a zero digest.
static constexpr unsigned max_size() noexcept
The dimensioned size of the digest is always 20 bytes.
bool operator!=(const std::string &hexdigits) const
Inequality operator.
const char * cdata_bytes() const noexcept
Raw digest char data (20 bytes) - const access. For consistency with other objects,...
bool operator==(const SHA1Digest &rhs) const
Equality operator.
void clear()
Reset the digest to zero.
static const SHA1Digest null
A null digest (ie, all zero).
static constexpr unsigned size_bytes() noexcept
The number of bytes in digest (20).
bool operator!=(const char *hexdigits) const
Inequality operator.
Istream & read(Istream &is)
Read (40-byte) text representation.
Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
A template class to specify that a data type can be considered as being contiguous in memory.