CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
shash::Any Struct Reference

#include <hash.h>

Inheritance diagram for shash::Any:
Collaboration diagram for shash::Any:

Public Member Functions

 Any ()
 
 Any (const Algorithms a, const char s=kSuffixNone)
 
 Any (const Algorithms a, const unsigned char *digest_buffer, const Suffix suffix=kSuffixNone)
 
 Any (const Algorithms a, const HexPtr hex, const char suffix=kSuffixNone)
 
Md5 CastToMd5 ()
 
- Public Member Functions inherited from shash::Digest< kMaxDigestSize, kAny >
unsigned GetDigestSize () const
 
unsigned GetHexSize () const
 
 Digest ()
 
 Digest (const Algorithms a, const HexPtr hex, const char s=0)
 
 Digest (const Algorithms a, const unsigned char *digest_buffer, const Suffix s=kSuffixNone)
 
void Randomize ()
 
void Randomize (const uint64_t seed)
 
void Randomize (Prng *prng)
 
bool HasSuffix () const
 
void set_suffix (const Suffix s)
 
std::string ToString (const bool with_suffix=false) const
 
std::string ToFingerprint (const bool with_suffix=false) const
 
std::string ToStringWithSuffix () const
 
std::string MakePath () const
 
std::string MakeAlternativePath () const
 
std::string MakePathWithoutSuffix () const
 
std::string MakePathExplicit (const unsigned dir_levels, const unsigned digits_per_level, const Suffix hash_suffix=kSuffixNone) const
 
bool IsNull () const
 
uint32_t Partial32 () const
 
void SetNull ()
 
bool operator== (const Digest< digest_size_, algorithm_ > &other) const
 
bool operator!= (const Digest< digest_size_, algorithm_ > &other) const
 
bool operator< (const Digest< digest_size_, algorithm_ > &other) const
 
bool operator> (const Digest< digest_size_, algorithm_ > &other) const
 

Additional Inherited Members

- Public Attributes inherited from shash::Digest< kMaxDigestSize, kAny >
unsigned char digest [digest_size_]
 
Algorithms algorithm
 
Suffix suffix
 

Detailed Description

Any as such must not be used except for digest storage. To do real work, the class has to be "blessed" to be a real hash by setting the algorithm field accordingly.

Definition at line 467 of file hash.h.

Constructor & Destructor Documentation

shash::Any::Any ( )
inline

Definition at line 468 of file hash.h.

shash::Any::Any ( const Algorithms  a,
const char  s = kSuffixNone 
)
inlineexplicit

Definition at line 470 of file hash.h.

shash::Any::Any ( const Algorithms  a,
const unsigned char *  digest_buffer,
const Suffix  suffix = kSuffixNone 
)
inline

Definition at line 474 of file hash.h.

shash::Any::Any ( const Algorithms  a,
const HexPtr  hex,
const char  suffix = kSuffixNone 
)
inlineexplicit

Definition at line 479 of file hash.h.

Member Function Documentation

Md5 shash::Any::CastToMd5 ( )

Definition at line 391 of file hash.cc.

Here is the call graph for this function:


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