libzypp 17.37.17
zypp::CheckSum Class Reference

#include <zypp-core/CheckSum.h>

Public Member Functions

 CheckSum ()
 Default Ctor: empty checksum.
 CheckSum (const std::string &type, const std::string &checksum)
 Creates a checksum for algorithm.
 CheckSum (const std::string &checksum)
 Creates a checksum auto probing the algorithm type.
 CheckSum (const std::string &type, std::istream &input_r)
 Reads the content of.
 CheckSum (const std::string &type, std::istream &&input_r)
 Ctor from temporary istream.

Static Public Member Functions

static const std::string & md5Type ()
static const std::string & shaType ()
static const std::string & sha1Type ()
static const std::string & sha224Type ()
static const std::string & sha256Type ()
static const std::string & sha384Type ()
static const std::string & sha512Type ()
Creates a checksum for algorithm \param type.
static CheckSum md5 (const std::string &checksum)
static CheckSum sha (const std::string &checksum)
static CheckSum sha1 (const std::string &checksum)
static CheckSum sha224 (const std::string &checksum)
static CheckSum sha256 (const std::string &checksum)
static CheckSum sha384 (const std::string &checksum)
static CheckSum sha512 (const std::string &checksum)

(Note that these are not member symbols.)

bool operator== (const CheckSum &lhs, const CheckSum &rhs)
bool operator!= (const CheckSum &lhs, const CheckSum &rhs)
std::ostream & operator<< (std::ostream &str, const CheckSum &obj)
 Stream output.
std::ostream & dumpAsXmlOn (std::ostream &str, const CheckSum &obj)
 XML output.
bool operator== (const CheckSum &lhs, const CheckSum &rhs)
bool operator!= (const CheckSum &lhs, const CheckSum &rhs)

Reads the content of \param input_r and computes the checksum.

std::string _type
std::string _checksum
std::string type () const
std::string checksum () const
bool empty () const
std::string asString () const
static CheckSum md5 (std::istream &input_r)
static CheckSum sha (std::istream &input_r)
static CheckSum sha1 (std::istream &input_r)
static CheckSum sha224 (std::istream &input_r)
static CheckSum sha256 (std::istream &input_r)
static CheckSum sha384 (std::istream &input_r)
static CheckSum sha512 (std::istream &input_r)
static CheckSum md5 (std::istream &&input_r)
static CheckSum sha (std::istream &&input_r)
static CheckSum sha1 (std::istream &&input_r)
static CheckSum sha224 (std::istream &&input_r)
static CheckSum sha256 (std::istream &&input_r)
static CheckSum sha384 (std::istream &&input_r)
static CheckSum sha512 (std::istream &&input_r)
static CheckSum md5FromString (const std::string &input_r)
static CheckSum shaFromString (const std::string &input_r)
static CheckSum sha1FromString (const std::string &input_r)
static CheckSum sha224FromString (const std::string &input_r)
static CheckSum sha256FromString (const std::string &input_r)
static CheckSum sha384FromString (const std::string &input_r)
static CheckSum sha512FromString (const std::string &input_r)

Detailed Description

Definition at line 33 of file CheckSum.h.

Constructor & Destructor Documentation

◆ CheckSum() [1/5]

zypp::CheckSum::CheckSum ( )
inline

Default Ctor: empty checksum.

Definition at line 37 of file CheckSum.h.

◆ CheckSum() [2/5]

zypp::CheckSum::CheckSum ( const std::string & type,
const std::string & checksum )

Creates a checksum for algorithm.

Parameters
type.
Exceptions
CheckSumExceptionif the checksum is invalid and can't be constructed

Definition at line 49 of file CheckSum.cc.

◆ CheckSum() [3/5]

zypp::CheckSum::CheckSum ( const std::string & checksum)
inline

Creates a checksum auto probing the algorithm type.

Exceptions
CheckSumExceptionif the checksum is invalid and can't be constructed

Definition at line 48 of file CheckSum.h.

◆ CheckSum() [4/5]

zypp::CheckSum::CheckSum ( const std::string & type,
std::istream & input_r )

Reads the content of.

Parameters
input_rand computes the checksum.

Definition at line 154 of file CheckSum.cc.

◆ CheckSum() [5/5]

zypp::CheckSum::CheckSum ( const std::string & type,
std::istream && input_r )
inline

Ctor from temporary istream.

Definition at line 58 of file CheckSum.h.

Member Function Documentation

◆ md5Type()

const std::string & zypp::CheckSum::md5Type ( )
static

Definition at line 28 of file CheckSum.cc.

◆ shaType()

const std::string & zypp::CheckSum::shaType ( )
static

Definition at line 31 of file CheckSum.cc.

◆ sha1Type()

const std::string & zypp::CheckSum::sha1Type ( )
static

Definition at line 34 of file CheckSum.cc.

◆ sha224Type()

const std::string & zypp::CheckSum::sha224Type ( )
static

Definition at line 37 of file CheckSum.cc.

◆ sha256Type()

const std::string & zypp::CheckSum::sha256Type ( )
static

Definition at line 40 of file CheckSum.cc.

◆ sha384Type()

const std::string & zypp::CheckSum::sha384Type ( )
static

Definition at line 43 of file CheckSum.cc.

◆ sha512Type()

const std::string & zypp::CheckSum::sha512Type ( )
static

Definition at line 46 of file CheckSum.cc.

◆ md5() [1/3]

CheckSum zypp::CheckSum::md5 ( const std::string & checksum)
inlinestatic

Definition at line 73 of file CheckSum.h.

◆ sha() [1/3]

CheckSum zypp::CheckSum::sha ( const std::string & checksum)
inlinestatic

Definition at line 74 of file CheckSum.h.

◆ sha1() [1/3]

CheckSum zypp::CheckSum::sha1 ( const std::string & checksum)
inlinestatic

Definition at line 75 of file CheckSum.h.

◆ sha224() [1/3]

CheckSum zypp::CheckSum::sha224 ( const std::string & checksum)
inlinestatic

Definition at line 76 of file CheckSum.h.

◆ sha256() [1/3]

CheckSum zypp::CheckSum::sha256 ( const std::string & checksum)
inlinestatic

Definition at line 77 of file CheckSum.h.

◆ sha384() [1/3]

CheckSum zypp::CheckSum::sha384 ( const std::string & checksum)
inlinestatic

Definition at line 78 of file CheckSum.h.

◆ sha512() [1/3]

CheckSum zypp::CheckSum::sha512 ( const std::string & checksum)
inlinestatic

Definition at line 79 of file CheckSum.h.

◆ md5() [2/3]

CheckSum zypp::CheckSum::md5 ( std::istream & input_r)
inlinestatic

Definition at line 84 of file CheckSum.h.

◆ sha() [2/3]

CheckSum zypp::CheckSum::sha ( std::istream & input_r)
inlinestatic

Definition at line 85 of file CheckSum.h.

◆ sha1() [2/3]

CheckSum zypp::CheckSum::sha1 ( std::istream & input_r)
inlinestatic

Definition at line 86 of file CheckSum.h.

◆ sha224() [2/3]

CheckSum zypp::CheckSum::sha224 ( std::istream & input_r)
inlinestatic

Definition at line 87 of file CheckSum.h.

◆ sha256() [2/3]

CheckSum zypp::CheckSum::sha256 ( std::istream & input_r)
inlinestatic

Definition at line 88 of file CheckSum.h.

◆ sha384() [2/3]

CheckSum zypp::CheckSum::sha384 ( std::istream & input_r)
inlinestatic

Definition at line 89 of file CheckSum.h.

◆ sha512() [2/3]

CheckSum zypp::CheckSum::sha512 ( std::istream & input_r)
inlinestatic

Definition at line 90 of file CheckSum.h.

◆ md5() [3/3]

CheckSum zypp::CheckSum::md5 ( std::istream && input_r)
inlinestatic

Definition at line 92 of file CheckSum.h.

◆ sha() [3/3]

CheckSum zypp::CheckSum::sha ( std::istream && input_r)
inlinestatic

Definition at line 93 of file CheckSum.h.

◆ sha1() [3/3]

CheckSum zypp::CheckSum::sha1 ( std::istream && input_r)
inlinestatic

Definition at line 94 of file CheckSum.h.

◆ sha224() [3/3]

CheckSum zypp::CheckSum::sha224 ( std::istream && input_r)
inlinestatic

Definition at line 95 of file CheckSum.h.

◆ sha256() [3/3]

CheckSum zypp::CheckSum::sha256 ( std::istream && input_r)
inlinestatic

Definition at line 96 of file CheckSum.h.

◆ sha384() [3/3]

CheckSum zypp::CheckSum::sha384 ( std::istream && input_r)
inlinestatic

Definition at line 97 of file CheckSum.h.

◆ sha512() [3/3]

CheckSum zypp::CheckSum::sha512 ( std::istream && input_r)
inlinestatic

Definition at line 98 of file CheckSum.h.

◆ md5FromString()

CheckSum zypp::CheckSum::md5FromString ( const std::string & input_r)
inlinestatic

Definition at line 103 of file CheckSum.h.

◆ shaFromString()

CheckSum zypp::CheckSum::shaFromString ( const std::string & input_r)
inlinestatic

Definition at line 104 of file CheckSum.h.

◆ sha1FromString()

CheckSum zypp::CheckSum::sha1FromString ( const std::string & input_r)
inlinestatic

Definition at line 105 of file CheckSum.h.

◆ sha224FromString()

CheckSum zypp::CheckSum::sha224FromString ( const std::string & input_r)
inlinestatic

Definition at line 106 of file CheckSum.h.

◆ sha256FromString()

CheckSum zypp::CheckSum::sha256FromString ( const std::string & input_r)
inlinestatic

Definition at line 107 of file CheckSum.h.

◆ sha384FromString()

CheckSum zypp::CheckSum::sha384FromString ( const std::string & input_r)
inlinestatic

Definition at line 108 of file CheckSum.h.

◆ sha512FromString()

CheckSum zypp::CheckSum::sha512FromString ( const std::string & input_r)
inlinestatic

Definition at line 109 of file CheckSum.h.

◆ type()

std::string zypp::CheckSum::type ( ) const

Definition at line 167 of file CheckSum.cc.

◆ checksum()

std::string zypp::CheckSum::checksum ( ) const

Definition at line 170 of file CheckSum.cc.

◆ empty()

bool zypp::CheckSum::empty ( ) const

Definition at line 173 of file CheckSum.cc.

◆ asString()

std::string zypp::CheckSum::asString ( ) const

Definition at line 176 of file CheckSum.cc.

◆ operator==() [1/2]

bool operator== ( const CheckSum & lhs,
const CheckSum & rhs )
related

Definition at line 207 of file CheckSum.cc.

◆ operator!=() [1/2]

bool operator!= ( const CheckSum & lhs,
const CheckSum & rhs )
related

Definition at line 211 of file CheckSum.cc.

◆ operator<<()

std::ostream & operator<< ( std::ostream & str,
const CheckSum & obj )
related

Stream output.

Definition at line 183 of file CheckSum.cc.

◆ dumpAsXmlOn()

std::ostream & dumpAsXmlOn ( std::ostream & str,
const CheckSum & obj )
related

XML output.

Definition at line 193 of file CheckSum.cc.

◆ operator==() [2/2]

bool operator== ( const CheckSum & lhs,
const CheckSum & rhs )
related

◆ operator!=() [2/2]

bool operator!= ( const CheckSum & lhs,
const CheckSum & rhs )
related

Member Data Documentation

◆ _type

std::string zypp::CheckSum::_type
private

Definition at line 121 of file CheckSum.h.

◆ _checksum

std::string zypp::CheckSum::_checksum
private

Definition at line 122 of file CheckSum.h.


The documentation for this class was generated from the following files: