SHA1 hash algorithm implementation. More...
#include <sha1.hpp>
Public Member Functions | |
| SHA1 () | |
| SHA1 (const std::string &data) | |
| SHA1 (std::istream &stream) | |
| virtual | ~SHA1 () |
| virtual const std::array< uint8_t, 20 > & | digest () const override |
Protected Member Functions | |
| virtual void | reset () override |
| virtual void | addData (const uint8_t *data, std::size_t len) override |
| virtual void | finalize () override |
Friends | |
| SHA1 | anch::crypto::HMAC (const std::string &, const std::string &) |
Additional Inherited Members | |
| Static Public Member Functions inherited from anch::crypto::Hash< 20, 64 > | |
| static constexpr std::size_t | getOutputSize () |
| static constexpr std::size_t | getBlockSize () |
| Protected Attributes inherited from anch::crypto::Hash< 20, 64 > | |
| std::array< uint8_t, O > * | _digest |
SHA1 hash algorithm implementation.
This algorithm is based on Qt framework algorithm.
| anch::crypto::SHA1::SHA1 | ( | ) |
SHA1 default constructor
| anch::crypto::SHA1::SHA1 | ( | const std::string & | data | ) |
SHA1 constructor with string
| data | The string data to process |
| anch::crypto::SHA1::SHA1 | ( | std::istream & | stream | ) |
SHA1 constructor with input stream.
| stream | The input stream to process |
|
virtual |
SHA1 destructor
|
overrideprotectedvirtual |
Compute hash for data with the current hash
| data | The data to add |
| len | The data length |
Implements anch::crypto::Hash< 20, 64 >.
|
overridevirtual |
|
overrideprotectedvirtual |
Finalize hash
Implements anch::crypto::Hash< 20, 64 >.
|
overrideprotectedvirtual |
Reset hash context
Implements anch::crypto::Hash< 20, 64 >.