

Public Member Functions | |
| sha1MessageDigest () | |
| void | update (const byte_t b) |
| void | update (const string &s) |
| void | update (const byte_t *buffer, const unsigned long len) |
| void | update (const byte_t *buffer, const unsigned long offset, const unsigned long len) |
| void | finalize () |
| void | finalize (const string &s) |
| void | finalize (const byte_t *buffer, const unsigned long len) |
| void | finalize (const byte_t *buffer, const unsigned long offset, const unsigned long len) |
| int | getDigestLength () const |
| const byte_t * | getDigest () const |
| void | reset () |
Protected Member Functions | |
| void | init () |
Static Protected Member Functions | |
| static void | transform (unsigned long state[5], const byte_t buffer[64]) |
Protected Attributes | |
| unsigned long | m_state [5] |
| unsigned long | m_count [2] |
| byte_t | m_buffer [64] |
| byte_t | m_digest [20] |
References sha1MessageDigest::init().
| void finalize | ( | const byte_t * | buffer, | |
| const unsigned long | offset, | |||
| const unsigned long | len | |||
| ) | [virtual] |
Completes the hash computation by performing final operations such as padding.
This is equivalent to calling update() and then finalize().
Implements messageDigest.
References sha1MessageDigest::finalize().
| void finalize | ( | const byte_t * | buffer, | |
| const unsigned long | len | |||
| ) | [virtual] |
Completes the hash computation by performing final operations such as padding.
This is equivalent to calling update() and then finalize().
Implements messageDigest.
References sha1MessageDigest::finalize(), and sha1MessageDigest::update().
| void finalize | ( | const string & | s | ) | [virtual] |
Completes the hash computation by performing final operations such as padding.
This is equivalent to calling update() and then finalize().
Implements messageDigest.
References sha1MessageDigest::finalize().
| void finalize | ( | ) | [virtual] |
Completes the hash computation by performing final operations such as padding.
Implements messageDigest.
References sha1MessageDigest::m_buffer, sha1MessageDigest::m_count, sha1MessageDigest::m_digest, sha1MessageDigest::m_state, and sha1MessageDigest::update().
Referenced by sha1MessageDigest::finalize().
| const byte_t * getDigest | ( | ) | const [virtual] |
Returns the hash, as computed by the algorithm.
You must call finalize() before using this function, or the hash will not be correct. To get the size of the returned array, call getDigestLength().
Implements messageDigest.
References sha1MessageDigest::m_digest.
| int getDigestLength | ( | ) | const [virtual] |
Returns the length of the hash.
This is the length of the array returned by getDigest().
Implements messageDigest.
| void init | ( | ) | [protected] |
References sha1MessageDigest::m_count, and sha1MessageDigest::m_state.
Referenced by sha1MessageDigest::reset(), and sha1MessageDigest::sha1MessageDigest().
| void reset | ( | ) | [virtual] |
Resets the algorithm to its initial state, so that you can compute a new hash using the same object.
Implements messageDigest.
References sha1MessageDigest::init().
| static void transform | ( | unsigned long | state[5], | |
| const byte_t | buffer[64] | |||
| ) | [static, protected] |
Referenced by sha1MessageDigest::update().
| void update | ( | const byte_t * | buffer, | |
| const unsigned long | offset, | |||
| const unsigned long | len | |||
| ) | [virtual] |
Updates the digest using the specified array of bytes, starting at the specified offset.
| buffer | array of bytes | |
| offset | offset to start from in the array of bytes | |
| len | number of bytes to use, starting at offset |
Implements messageDigest.
References sha1MessageDigest::update().
| void update | ( | const byte_t * | buffer, | |
| const unsigned long | len | |||
| ) | [virtual] |
Updates the digest using the specified array of bytes.
| buffer | array of bytes | |
| len | number of bytes to use in the buffer |
Implements messageDigest.
References sha1MessageDigest::m_buffer, sha1MessageDigest::m_count, sha1MessageDigest::m_state, and sha1MessageDigest::transform().
| void update | ( | const string & | s | ) | [virtual] |
Updates the digest using the specified string.
| s | the string with which to update the digest. |
Implements messageDigest.
References sha1MessageDigest::update().
| void update | ( | const byte_t | b | ) | [virtual] |
Updates the digest using the specified byte.
| b | the byte with which to update the digest. |
Implements messageDigest.
Referenced by sha1MessageDigest::finalize(), and sha1MessageDigest::update().
Referenced by sha1MessageDigest::finalize(), and sha1MessageDigest::update().
unsigned long m_count[2] [protected] |
Referenced by sha1MessageDigest::finalize(), sha1MessageDigest::init(), and sha1MessageDigest::update().
Referenced by sha1MessageDigest::finalize(), and sha1MessageDigest::getDigest().
unsigned long m_state[5] [protected] |
Referenced by sha1MessageDigest::finalize(), sha1MessageDigest::init(), and sha1MessageDigest::update().
1.6.2