ProteoWizard
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
pwiz::util::SHA1Calculator Class Reference

#include <SHA1Calculator.hpp>

Public Member Functions

 SHA1Calculator ()
 
void reset ()
 resets hash More...
 
void update (const unsigned char *buffer, size_t bufferSize)
 update hash with buffer of bytes More...
 
void update (const std::string &buffer)
 update hash with buffer of bytes More...
 
void close ()
 finish the hash More...
 
std::string hash () const
 returns the current hash value note: close() must be called first to retrieve final hash value More...
 
std::string hashProjected () const
 returns projected final hash value as if close() were called first; hash remains open and update() may be called afterwards More...
 

Static Public Member Functions

static std::string hash (const std::string &buffer)
 static function to calculate hash of a buffer More...
 
static std::string hash (const unsigned char *buffer, size_t bufferSize)
 static function to calculate hash of a buffer More...
 
static std::string hash (std::istream &is)
 static function to calculate hash of an input stream More...
 
static std::string hashFile (const std::string &filename)
 static function to calculate hash of a file More...
 

Private Member Functions

 SHA1Calculator (const SHA1Calculator &)
 
SHA1Calculatoroperator= (const SHA1Calculator &)
 

Private Attributes

boost::shared_ptr< Impl > impl_
 

Detailed Description

Definition at line 37 of file SHA1Calculator.hpp.

Constructor & Destructor Documentation

§ SHA1Calculator() [1/2]

pwiz::util::SHA1Calculator::SHA1Calculator ( )

§ SHA1Calculator() [2/2]

pwiz::util::SHA1Calculator::SHA1Calculator ( const SHA1Calculator )
private

Member Function Documentation

§ reset()

void pwiz::util::SHA1Calculator::reset ( )

resets hash

Referenced by test().

§ update() [1/2]

void pwiz::util::SHA1Calculator::update ( const unsigned char *  buffer,
size_t  bufferSize 
)

update hash with buffer of bytes

Referenced by pwiz::util::SHA1SymmetricFilter::filter(), test(), testMillion(), and testProjected().

§ update() [2/2]

void pwiz::util::SHA1Calculator::update ( const std::string &  buffer)

update hash with buffer of bytes

§ close()

void pwiz::util::SHA1Calculator::close ( )

finish the hash

Referenced by test(), testMillion(), and testProjected().

§ hash() [1/4]

std::string pwiz::util::SHA1Calculator::hash ( ) const

returns the current hash value note: close() must be called first to retrieve final hash value

Referenced by test(), testFile(), testMillion(), testProjected(), testStatic(), and testStream().

§ hashProjected()

std::string pwiz::util::SHA1Calculator::hashProjected ( ) const

returns projected final hash value as if close() were called first; hash remains open and update() may be called afterwards

Referenced by pwiz::util::SHA1SymmetricFilter::hash(), and testProjected().

§ hash() [2/4]

static std::string pwiz::util::SHA1Calculator::hash ( const std::string &  buffer)
static

static function to calculate hash of a buffer

§ hash() [3/4]

static std::string pwiz::util::SHA1Calculator::hash ( const unsigned char *  buffer,
size_t  bufferSize 
)
static

static function to calculate hash of a buffer

§ hash() [4/4]

static std::string pwiz::util::SHA1Calculator::hash ( std::istream &  is)
static

static function to calculate hash of an input stream

§ hashFile()

static std::string pwiz::util::SHA1Calculator::hashFile ( const std::string &  filename)
static

static function to calculate hash of a file

Referenced by testFile().

§ operator=()

SHA1Calculator& pwiz::util::SHA1Calculator::operator= ( const SHA1Calculator )
private

Member Data Documentation

§ impl_

boost::shared_ptr<Impl> pwiz::util::SHA1Calculator::impl_
private

Definition at line 76 of file SHA1Calculator.hpp.


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