15 #ifndef ZYPP_MEDIA_DIGEST_H
16 #define ZYPP_MEDIA_DIGEST_H
60 static const std::string &
md5();
62 static const std::string &
sha1();
64 static const std::string &
sha256();
87 const std::string&
name();
94 bool update(
const char* bytes,
size_t len);
131 static std::string
digest(
const std::string&
name, std::istream& is,
size_t bufsize = 4096);
134 static std::string
digest(
const std::string &
name,
const std::string & input,
size_t bufsize = 4096 );
static const std::string & sha256()
sha256
static const std::string & sha1()
sha1
std::string digest()
get hex string representation of the digest
Compute Message Digests (MD5, SHA1 etc)
virtual bool askUserToAccepUnknownDigest(const Pathname &file, const std::string &name)
const std::string & name()
get the name of the current digest algorithm
bool reset()
reset internal digest state
std::vector< unsigned char > digestVector()
get vector of unsigned char representation of the digest
const Digest & operator=(const Digest &d)
virtual bool askUserToAcceptNoDigest(const zypp::Pathname &file)
bool create(const std::string &name)
initialize creation of a new message digest
static const std::string & md5()
md5
virtual bool askUserToAcceptWrongDigest(const Pathname &file, const std::string &requested, const std::string &found)
bool update(const char *bytes, size_t len)
feed data into digest computation algorithm