5 #include "cvmfs_config.h"
8 #ifndef __STDC_FORMAT_MACROS
9 #define __STDC_FORMAT_MACROS
27 if (algorithm ==
"md5")
30 throw EPublish(
"unknown hash algorithm: " + algorithm);
32 if (options.
Has(
"input")) {
40 if (options.
Has(
"split")) {
42 throw EPublish(
"split int representation only supported for MD5");
50 " [%" PRId64
" %" PRId64
"]",
51 static_cast<int64_t>(high), static_cast<int64_t>(low));
void HashString(const std::string &content, Any *any_digest)
bool Has(const std::string &key) const
void ToIntPair(uint64_t *lo, uint64_t *hi) const
std::string GetString(const std::string &key) const
std::string ToString(const bool with_suffix=false) const
unsigned char digest[digest_size_]
std::string ToFingerprint(const bool with_suffix=false) const
Algorithms ParseHashAlgorithm(const string &algorithm_option)
bool HashFd(int fd, Any *any_digest)
virtual int Main(const Options &options)
const unsigned kDigestSizes[]
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)