ProteoWizard
Public Types | Public Member Functions | Private Attributes
pwiz::util::SHA1SymmetricFilter Class Reference

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

#include <SHA1_ostream.hpp>

List of all members.

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

Definition at line 43 of file SHA1_ostream.hpp.


Member Function Documentation

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().

{
const char* dest_begin_orig = dest_begin;
for (; src_begin!=src_end && dest_begin!=dest_end; ++src_begin, ++dest_begin)
*dest_begin = *src_begin;
sha1_.update(reinterpret_cast<const unsigned char*>(dest_begin_orig),
dest_begin - dest_begin_orig);
return false;
}
void pwiz::util::SHA1SymmetricFilter::close ( )
inline

Definition at line 59 of file SHA1_ostream.hpp.

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

Definition at line 61 of file SHA1_ostream.hpp.

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

{
return sha1_.hashProjected();
};

Member Data Documentation

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: