OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

SHA1 Class Reference

Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1. More...

List of all members.


Public Member Functions

 SHA1 ()
 Construct null.
 SHA1 (const std::string &)
 Construct and append initial std::string.
 SHA1 (const char *)
 Construct and append initial string.
void clear ()
 Reset the hashed data before appending more.
SHA1append (const char *data, size_t len)
 Append data for processing.
SHA1append (const std::string &)
 Append string for processing.
SHA1append (const char *str)
 Append string for processing.
bool finalize ()
 Finalized the calculations (normally not needed directly).
SHA1Digest digest () const
 Calculate current digest from appended data.
bool operator== (const SHA1Digest &) const
 Equality operator.
bool operator!= (const SHA1Digest &) const
 Inequality operator.
bool operator== (const SHA1 &) const
 Equality operator.
bool operator!= (const SHA1 &) const
 Inequality operator.
 operator SHA1Digest () const
 Convert to a digest, calculate current digest from appended data.

Friends

Ostreamoperator<< (Ostream &, const SHA1 &)

Detailed Description

Functions to compute SHA1 message digest according to the NIST specification FIPS-180-1.

Adapted from the gnulib implementation.

See also:
Foam::SHA1Digest
Source files

Definition at line 64 of file SHA1.H.


Constructor & Destructor Documentation

SHA1 (  )  [inline]

Construct null.

Definition at line 23 of file SHA1I.H.

SHA1 ( const std::string &  str  )  [inline, explicit]

Construct and append initial std::string.

Definition at line 29 of file SHA1I.H.

References SHA1::clear().

Here is the call graph for this function:

SHA1 ( const char *  str  )  [inline, explicit]

Construct and append initial string.

Definition at line 36 of file SHA1I.H.

References SHA1::append(), and SHA1::clear().

Here is the call graph for this function:


Member Function Documentation

void clear (  ) 

Reset the hashed data before appending more.

Definition at line 352 of file SHA1.C.

Referenced by SHA1::SHA1().

Here is the caller graph for this function:

Foam::SHA1 & append ( const char *  data,
size_t  len 
) [inline]

Append data for processing.

Definition at line 48 of file SHA1I.H.

Referenced by SHA1::SHA1(), and sha1streambuf::xsputn().

Here is the caller graph for this function:

Foam::SHA1 & append ( const std::string &  str  )  [inline]

Append string for processing.

Definition at line 55 of file SHA1I.H.

Foam::SHA1 & append ( const char *  str  )  [inline]

Append string for processing.

Definition at line 62 of file SHA1I.H.

bool finalize (  ) 

Finalized the calculations (normally not needed directly).

Returns false if no bytes were passed for processing

Definition at line 367 of file SHA1.C.

Foam::SHA1Digest digest (  )  const

Calculate current digest from appended data.

Definition at line 406 of file SHA1.C.

Referenced by SHA1::operator!=(), and Foam::operator<<().

Here is the caller graph for this function:

bool operator== ( const SHA1Digest rhs  )  const [inline]

Equality operator.

Definition at line 74 of file SHA1I.H.

bool operator!= ( const SHA1Digest rhs  )  const [inline]

Inequality operator.

Definition at line 80 of file SHA1I.H.

References SHA1::digest().

Here is the call graph for this function:

bool operator== ( const SHA1 rhs  )  const [inline]

Equality operator.

Definition at line 86 of file SHA1I.H.

bool operator!= ( const SHA1 rhs  )  const [inline]

Inequality operator.

Definition at line 92 of file SHA1I.H.

operator SHA1Digest (  )  const [inline]

Convert to a digest, calculate current digest from appended data.


Friends And Related Function Documentation

Ostream& operator<< ( Ostream ,
const SHA1  
) [friend]


The documentation for this class was generated from the following files:
  • src/OpenFOAM/primitives/hashes/SHA1/SHA1.H
  • src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
  • src/OpenFOAM/primitives/hashes/SHA1/SHA1I.H
Copyright © 2000-2009 OpenCFD Ltd