libzypp  13.10.6
zypp::CheckSum Class Reference

#include <CheckSum.h>

Public Member Functions

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

Static Public Member Functions

static const std::string & md5Type ()
 
static const std::string & shaType ()
 
static const std::string & sha1Type ()
 
static const std::string & sha256Type ()
 
static CheckSum md5 (const std::string &checksum)
 
static CheckSum sha (const std::string &checksum)
 
static CheckSum sha1 (const std::string &checksum)
 
static CheckSum sha256 (const std::string &checksum)
 
static CheckSum md5 (std::istream &input_r)
 
static CheckSum sha (std::istream &input_r)
 
static CheckSum sha1 (std::istream &input_r)
 
static CheckSum sha256 (std::istream &input_r)
 

Private Attributes

std::string _type
 
std::string _checksum
 

Related Functions

(Note that these are not member functions.)

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)
 
std::ostream & dumpAsXmlOn (std::ostream &str, const CheckSum &obj)
 
bool operator== (const CheckSum &lhs, const CheckSum &rhs)
 
bool operator!= (const CheckSum &lhs, const CheckSum &rhs)
 

Detailed Description

Definition at line 32 of file CheckSum.h.

Constructor & Destructor Documentation

zypp::CheckSum::CheckSum ( )

Default Ctor: empty checksum.

Definition at line 41 of file CheckSum.cc.

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

Creates a checksum auto probing the algorithm type.

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

Definition at line 44 of file CheckSum.cc.

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.

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

Reads the content of.

Parameters
input_rand computes the checksum.

Definition at line 118 of file CheckSum.cc.

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

Move Ctor.

Definition at line 54 of file CheckSum.h.

Member Function Documentation

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

Definition at line 28 of file CheckSum.cc.

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

Definition at line 31 of file CheckSum.cc.

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

Definition at line 34 of file CheckSum.cc.

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

Definition at line 37 of file CheckSum.cc.

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

Definition at line 65 of file CheckSum.h.

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

Definition at line 67 of file CheckSum.h.

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

Definition at line 69 of file CheckSum.h.

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

Definition at line 71 of file CheckSum.h.

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

Definition at line 74 of file CheckSum.h.

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

Definition at line 76 of file CheckSum.h.

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

Definition at line 78 of file CheckSum.h.

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

Definition at line 80 of file CheckSum.h.

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

Definition at line 131 of file CheckSum.cc.

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

Definition at line 134 of file CheckSum.cc.

bool zypp::CheckSum::empty ( ) const

Definition at line 137 of file CheckSum.cc.

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

Definition at line 140 of file CheckSum.cc.

Friends And Related Function Documentation

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

Definition at line 171 of file CheckSum.cc.

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

Definition at line 175 of file CheckSum.cc.

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

Stream output.

Definition at line 147 of file CheckSum.cc.

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

XML output.

Definition at line 157 of file CheckSum.cc.

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

Member Data Documentation

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

Definition at line 92 of file CheckSum.h.

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

Definition at line 93 of file CheckSum.h.


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