32 {
static std::string
_type(
"sha" );
return _type; }
50 : _type(
str::toLower( type ) )
51 , _checksum( checksum )
128 WAR <<
"Can't determine type of " <<
checksum.size() <<
" byte checksum '" <<
_checksum <<
"'" << endl;
136 std::string msg =
str::form (
_(
"Dubious type '%s' for %u byte checksum '%s'"),
178 std::ostringstream
str;
185 if (
obj.checksum().empty() )
187 return str << std::string(
"NoCheckSum");
190 return str << (
obj.type().empty() ? std::string(
"UNKNOWN") :
obj.type() ) <<
'-' <<
obj.checksum();
195 const std::string & type(
obj.type() );
196 const std::string & checksum(
obj.checksum() );
198 if ( ! type.empty() )
str <<
" type=\"" << type <<
"\"";
199 if ( checksum.empty() )
202 str <<
">" << checksum <<
"</checksum>";
212 {
return ! ( lhs == rhs ); }
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
static const std::string & sha512Type()
bool operator==(const CheckSum &lhs, const CheckSum &rhs)
std::string asString() const
static const std::string & sha256Type()
static const std::string & sha384Type()
static const std::string & shaType()
static const std::string & sha1Type()
static const std::string & sha224Type()
static const std::string & md5Type()
std::string checksum() const
CheckSum()
Default Ctor: empty checksum.
bool operator!=(const CheckSum &lhs, const CheckSum &rhs)
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
static const std::string & sha1()
sha1
static const std::string & sha256()
sha256
static const std::string & sha224()
sha224
String related utilities and Regular expression matching.
std::string toLower(const std::string &s)
Return lowercase version of s.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
std::ostream & dumpAsXmlOn(std::ostream &str, const Repository &obj)
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.