|
libktorrent
2.1.1
|
#include <sha1hashgen.h>
Public Member Functions | |
| void | end () |
| SHA1Hash | generate (const Uint8 *data, Uint32 len) |
| SHA1Hash | get () const |
| void | start () |
| void | update (const Uint8 *data, Uint32 len) |
Generates a SHA1 hash, code based on wikipedia's pseudocode There are 2 ways to use this class :
Mixing the 2, is not a good idea
Definition at line 45 of file sha1hashgen.h.
| void bt::SHA1HashGen::end | ( | ) |
All data has been delivered, calculate the final hash.
| SHA1Hash bt::SHA1HashGen::generate | ( | const Uint8 * | data, |
| Uint32 | len | ||
| ) |
Generate a hash from a bunch of data.
| data | The data |
| len | The length |
| SHA1Hash bt::SHA1HashGen::get | ( | ) | const |
Get the hash generated.
| void bt::SHA1HashGen::start | ( | ) |
Start SHA1 hash generation in chunks.
| void bt::SHA1HashGen::update | ( | const Uint8 * | data, |
| Uint32 | len | ||
| ) |
Update the hash.
| data | The data |
| len | Length of the data |
1.8.18