15#ifndef ZYPP_CORE_DIGEST_H
16#define ZYPP_CORE_DIGEST_H
22#include <zypp-core/Pathname.h>
23#include <zypp-core/ByteArray.h>
24#include <zypp-core/ByteCount.h>
51 static const std::string &
md5();
53 static const std::string &
sha1();
55 static const std::string &
sha224();
57 static const std::string &
sha256();
59 static const std::string &
sha384();
61 static const std::string &
sha512();
84 const std::string&
name();
91 bool update(
const char* bytes,
size_t len);
98 bool update(std::istream& is,
size_t bufsize = 4096);
120#ifdef __cpp_lib_string_view
125 static ByteArray hexStringToByteArray ( std::string_view
str );
126 static UByteArray hexStringToUByteArray ( std::string_view
str );
155 static std::string
digest(
const std::string&
name, std::istream& is,
size_t bufsize = 4096);
158 static std::string
digest(
const std::string &
name,
const std::string & input,
size_t bufsize = 4096 );
Store and operate with byte count.
static const std::string & md5()
md5
static const std::string & sha384()
sha384
std::string digest()
get hex string representation of the digest
static const std::string & sha512()
sha512
UByteArray digestVector()
get vector of unsigned char representation of the digest
static const std::string & sha1()
sha1
bool update(const char *bytes, size_t len)
feed data into digest computation algorithm
zypp::ByteCount bytesHashed() const
Returns the number of input bytes that have been added to the hash.
const Digest & operator=(const Digest &d)
static const std::string & sha256()
sha256
static const std::string & sha224()
sha224
static std::string digestVectorToString(const UByteArray &vec)
get hex string representation of the digest vector given as parameter
bool reset()
reset internal digest state
const std::string & name()
get the name of the current digest algorithm
bool create(const std::string &name)
initialize creation of a new message digest
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.