|
static std::string | digest (const std::string &name, std::istream &is, size_t bufsize=4096) |
| compute digest of a stream. More...
|
|
static std::string | digest (const std::string &name, const std::string &input, size_t bufsize=4096) |
|
|
static const std::string & | md5 () |
| md5 More...
|
|
static const std::string & | sha1 () |
| sha1 More...
|
|
static const std::string & | sha224 () |
| sha224 More...
|
|
static const std::string & | sha256 () |
| sha256 More...
|
|
static const std::string & | sha384 () |
| sha384 More...
|
|
static const std::string & | sha512 () |
| sha512 More...
|
|
Compute Message Digests (MD5, SHA1 etc)
The computation works by initializing the algorithm using create(). This will construct an internal state. successive calls to update() deliver the data for which the digest is to be computed. After all data has been deliverd, a call to digest() finalizes the computation and returns the result
Definition at line 45 of file Digest.h.
bool zypp::Digest::create |
( |
const std::string & |
name | ) |
|
initialize creation of a new message digest
Since openssl is used as backend you may use anything that openssl supports (see man 1 dgst). Common examples are md5 or sha1. sha1 should be preferred when creating digests to verify the authenticity of something.
successive calls to this funcion will destroy the internal state and reinit from scratch
- Parameters
-
name | name of the message digest algorithm. |
- Returns
- whether an error occured
Definition at line 156 of file Digest.cc.