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

model of boost::iostreams::SymmetricFilter More...

#include <SHA1_ostream.hpp>

Public Types

typedef char char_type
 

Public Member Functions

bool filter (const char *&src_begin, const char *src_end, char *&dest_begin, char *dest_end, bool flush)
 
void close ()
 
std::string hash ()
 

Private Attributes

SHA1Calculator sha1_
 

Detailed Description

model of boost::iostreams::SymmetricFilter

Definition at line 39 of file SHA1_ostream.hpp.

Member Typedef Documentation

§ char_type

Definition at line 43 of file SHA1_ostream.hpp.

Member Function Documentation

§ filter()

bool pwiz::util::SHA1SymmetricFilter::filter ( const char *&  src_begin,
const char *  src_end,
char *&  dest_begin,
char *  dest_end,
bool  flush 
)
inline

Definition at line 45 of file SHA1_ostream.hpp.

References sha1_, and pwiz::util::SHA1Calculator::update().

Referenced by pwiz::util::SHA1Filter::hash().

47  {
48  const char* dest_begin_orig = dest_begin;
49 
50  for (; src_begin!=src_end && dest_begin!=dest_end; ++src_begin, ++dest_begin)
51  *dest_begin = *src_begin;
52 
53  sha1_.update(reinterpret_cast<const unsigned char*>(dest_begin_orig),
54  dest_begin - dest_begin_orig);
55 
56  return false;
57  }
void update(const unsigned char *buffer, size_t bufferSize)
update hash with buffer of bytes

§ close()

void pwiz::util::SHA1SymmetricFilter::close ( )
inline

Definition at line 59 of file SHA1_ostream.hpp.

59 {}

§ hash()

std::string pwiz::util::SHA1SymmetricFilter::hash ( )
inline

Definition at line 61 of file SHA1_ostream.hpp.

References pwiz::util::SHA1Calculator::hashProjected(), and sha1_.

62  {
63  return sha1_.hashProjected();
64  };
std::string hashProjected() const
returns projected final hash value as if close() were called first; hash remains open and update() ma...

Member Data Documentation

§ sha1_

SHA1Calculator pwiz::util::SHA1SymmetricFilter::sha1_
private

Definition at line 64 of file SHA1_ostream.hpp.

Referenced by filter(), and hash().


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