Computes message digests using standard algorithms, such as MD5 or SHA. More...


Public Member Functions | |
| virtual void | update (const string &s)=0 |
| virtual void | update (const byte_t b)=0 |
| virtual void | update (const byte_t *buffer, const unsigned long len)=0 |
| virtual void | update (const byte_t *buffer, const unsigned long offset, const unsigned long len)=0 |
| virtual void | finalize ()=0 |
| virtual void | finalize (const string &s)=0 |
| virtual void | finalize (const byte_t *buffer, const unsigned long len)=0 |
| virtual void | finalize (const byte_t *buffer, const unsigned long offset, const unsigned long len)=0 |
| virtual int | getDigestLength () const =0 |
| virtual const byte_t * | getDigest () const =0 |
| virtual const string | getHexDigest () const |
| virtual void | reset ()=0 |
Computes message digests using standard algorithms, such as MD5 or SHA.
| virtual void finalize | ( | const byte_t * | buffer, | |
| const unsigned long | offset, | |||
| const unsigned long | len | |||
| ) | [pure virtual] |
Completes the hash computation by performing final operations such as padding.
This is equivalent to calling update() and then finalize().
Implemented in sha1MessageDigest.
| virtual void finalize | ( | const byte_t * | buffer, | |
| const unsigned long | len | |||
| ) | [pure virtual] |
Completes the hash computation by performing final operations such as padding.
This is equivalent to calling update() and then finalize().
Implemented in sha1MessageDigest.
| virtual void finalize | ( | const string & | s | ) | [pure virtual] |
Completes the hash computation by performing final operations such as padding.
This is equivalent to calling update() and then finalize().
Implemented in sha1MessageDigest.
| virtual void finalize | ( | ) | [pure virtual] |
Completes the hash computation by performing final operations such as padding.
Implemented in sha1MessageDigest.
| virtual const byte_t* getDigest | ( | ) | const [pure 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().
Implemented in sha1MessageDigest.
Referenced by messageDigest::getHexDigest().
| virtual int getDigestLength | ( | ) | const [pure virtual] |
Returns the length of the hash.
This is the length of the array returned by getDigest().
Implemented in sha1MessageDigest.
Referenced by messageDigest::getHexDigest().
| const string getHexDigest | ( | ) | const [virtual] |
Returns the hash as an hexadecimal string.
You must call finalize() before using this function, or the hash will not be correct.
References messageDigest::getDigest(), and messageDigest::getDigestLength().
| virtual void reset | ( | ) | [pure virtual] |
Resets the algorithm to its initial state, so that you can compute a new hash using the same object.
Implemented in sha1MessageDigest.
| virtual void update | ( | const byte_t * | buffer, | |
| const unsigned long | offset, | |||
| const unsigned long | len | |||
| ) | [pure 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 |
Implemented in sha1MessageDigest.
| virtual void update | ( | const byte_t * | buffer, | |
| const unsigned long | len | |||
| ) | [pure virtual] |
Updates the digest using the specified array of bytes.
| buffer | array of bytes | |
| len | number of bytes to use in the buffer |
Implemented in sha1MessageDigest.
| virtual void update | ( | const byte_t | b | ) | [pure virtual] |
Updates the digest using the specified byte.
| b | the byte with which to update the digest. |
Implemented in sha1MessageDigest.
| virtual void update | ( | const string & | s | ) | [pure virtual] |
Updates the digest using the specified string.
| s | the string with which to update the digest. |
Implemented in sha1MessageDigest.
1.6.2