Go to the documentation of this file.
37 static const char hexChars[] =
"0123456789abcdef";
66 else if (!isxdigit(
c))
69 <<
"Illegal hex digit: '" <<
c <<
"'"
104 for (
const auto& byteVal : dig_)
123 buf.resize(1 + 2*dig_.size());
128 buf.resize(2*dig_.size());
131 for (
const auto& byteVal : dig_)
133 buf[nChar++] =
hexChars[((byteVal >> 4) & 0xF)];
143 for (
auto& byteVal : dig_)
148 byteVal = (upp << 4) + low;
163 for (
const auto& byteVal : dig_)
178 return (dig_ == rhs.dig_);
185 if (hexdigits.empty())
192 if (hexdigits[0] ==
'_')
198 if (hexdigits.size() != nChar + 2*dig_.size())
203 for (
const auto& byteVal : dig_)
205 const char upp =
hexChars[((byteVal >> 4) & 0xF)];
206 const char low =
hexChars[(byteVal & 0xF)];
208 if (upp != hexdigits[nChar++])
return false;
209 if (low != hexdigits[nChar++])
return false;
219 if (!hexdigits || !*hexdigits)
226 if (hexdigits[0] ==
'_')
232 if (strlen(hexdigits) != nChar + 2*dig_.size())
237 for (
const auto& byteVal : dig_)
239 const char upp =
hexChars[((byteVal >> 4) & 0xF)];
240 const char low =
hexChars[(byteVal & 0xF)];
242 if (upp != hexdigits[nChar++])
return false;
243 if (low != hexdigits[nChar++])
return false;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
bool operator==(const SHA1Digest &) const
bool read(const char *buf, int32_t &val)
Istream & operator>>(Istream &, directionInfo &)
static const char hexChars[]
static const SHA1Digest null
virtual Ostream & write(const char c)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Ostream & write(Ostream &os, const bool prefixed=false) const
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static constexpr int offsetZero
static unsigned char readHexDigit(Istream &is)
virtual bool check(const char *operation) const
static constexpr int offsetUpper
OBJstream os(runTime.globalPath()/outputName)
virtual bool write(const token &tok)=0
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool operator!=(const SHA1Digest &) const
const dimensionedScalar c
#define FatalIOErrorInFunction(ios)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Istream & read(Istream &is)
std::string str(const bool prefixed=false) const
virtual Istream & read(token &)=0