#include <sha1hash.h>
Inheritance diagram for SHA1Hash:
Public Member Functions | |
SHA1Hash () | |
Constructor for SHA1 hash. | |
~SHA1Hash () | |
Destructor cleans up the hash state. | |
const Parameters * | GetPar () const |
Get parameters of this hash algo; see base clas. | |
uint64 | FedBytes () const |
Returns number of fed bytes; see base class. | |
void | reset () |
Reset has algo; see base class. | |
void | feed (const char *buf, size_t len) |
Feed the hash algo with data; see base class. | |
void | final () |
Finish hash computation; see base class. | |
void | GetHash (char *buf) const |
Get current has value; see base class. | |
Static Public Attributes | |
const Parameters | par |
Parameters of the hash algo. | |
Private Member Functions | |
void | AtomicHash (const unsigned char *msg, uint32 *w) |
Internally used "atomic" hash; msg has a size of 64 bytes. | |
SHA1Hash (const SHA1Hash &) | |
Do not use these:. | |
void | operator= (const SHA1Hash &) |
Private Attributes | |
uint32 | state [5] |
hash status; hash value | |
unsigned char | tmpbuf [64] |
may be over from last call to Feed() | |
int | tmp_size |
number of bytes in tmpbuf |
Definition at line 41 of file sha1hash.h.
|
Do not use these:.
|
|
Constructor for SHA1 hash.
Definition at line 62 of file sha1hash.h. References reset(). |
|
Destructor cleans up the hash state.
Definition at line 65 of file sha1hash.h. References reset(). |
|
Internally used "atomic" hash; msg has a size of 64 bytes.
Definition at line 67 of file sha1hash.cc. References EXPAND, rotate(), sha_const0, sha_const1, sha_const2, sha_const3, sha_func0(), sha_func1(), sha_func2(), sha_func3(), state, and uint32. |
|
Returns number of fed bytes; see base class.
Reimplemented from SecureHashBase. Definition at line 73 of file sha1hash.h. References uint64. |
|
Feed the hash algo with data; see base class.
Reimplemented from SecureHashBase. Definition at line 168 of file sha1hash.cc. References AtomicHash(), tmp_size, tmpbuf, uint32, and uint64. |
|
Finish hash computation; see base class.
Reimplemented from SecureHashBase. Definition at line 219 of file sha1hash.cc. References AtomicHash(), tmp_size, tmpbuf, uint32, and uint64. |
|
Get current has value; see base class.
Reimplemented from SecureHashBase. Definition at line 139 of file sha1hash.cc. |
|
Get parameters of this hash algo; see base clas.
Reimplemented from SecureHashBase. Definition at line 69 of file sha1hash.h. References par. |
|
|
|
Reset has algo; see base class.
Reimplemented from SecureHashBase. Definition at line 154 of file sha1hash.cc. References sha_init_state, state, tmp_size, and tmpbuf. Referenced by SHA1Hash(), and ~SHA1Hash(). |
|
Initial value: { INIT_FIELD(hash_size) 20, INIT_FIELD(block_size) 64, INIT_FIELD(hash_ID) 0x1001, INIT_FIELD(name) "SHA1" }
Reimplemented from SecureHashBase. Definition at line 23 of file sha1hash.cc. Referenced by GetPar(). |
|
hash status; hash value
Definition at line 48 of file sha1hash.h. Referenced by AtomicHash(), GetHash(), and reset(). |
|
number of bytes in tmpbuf
Definition at line 52 of file sha1hash.h. |
|
may be over from last call to Feed()
Definition at line 51 of file sha1hash.h. |