24 #ifndef INC_MD5_HPP_2148BE88_EEAD_409F_85F0_E0E0420BC431
25 #define INC_MD5_HPP_2148BE88_EEAD_409F_85F0_E0E0420BC431
77 void reset()
override;
89 uint8_t*
getValue(uint8_t* buffer)
const override;
98 size_t getSize()
const override{
return 16; }
106 void update(
const uint8_t* buf,
size_t len)
override;
170 return ChecksumAlgoId::MD5;
Computes a checksum from a byte stream.
Computes a hash from a byte stream.
Computes the MD5 hash from a byte stream.
void update(const uint8_t *buf, size_t len) override
Updates the MD5 hash with specified array of bytes.
static std::string getHashName()
Returns the name of the hash algorithm.
size_t getSize() const override
Returns the minimal size to allocate in memory to store the hash with the getValue(buffer) method.
uint32_t B_
Second part of the state of computation.
uint32_t nblocks
Number of blocks.
std::string getName() const override
Returns the name of the checksum or the hash algorithm.
static constexpr ChecksumAlgoId getIdentifier()
Returns an unique identifier for the hash algorithm.
uint32_t C_
Third part of the state of computation.
uint8_t * getValue(uint8_t *buffer) const override
Returns the MD5 hash value in the first 16 bytes of the given address.
uint32_t A_
First part of the state of computation.
int count
Current size of the input buffer.
void reset() override
Resets the MD5 hash to initial state of computation.
MD5()
Default constructor.
void finish()
Process the remaining bytes in the internal buffer and the usual prolog according to the standard.
static Checksum * getNewInstance()
Gets a new instance of this class.
uint8_t ibuffer[64]
Input buffer.
uint32_t D_
Fourth part of the state of computation.
ChecksumAlgoId getID() const override
Returns an unique identifier for the checksum or the hash algorithm.
void transform(uint8_t *data)
Transform n*64 bytes.
Interface for classes from the Libgcrypt that compute hashes.
ChecksumAlgoId
Ids of algorithms of checksums.