24 #ifndef INC_MD4_HPP_A048742F_00A1_4097_9B9A_B3FA4E9D013F
25 #define INC_MD4_HPP_A048742F_00A1_4097_9B9A_B3FA4E9D013F
78 void reset()
override;
88 uint8_t*
getValue(uint8_t* buffer)
const override;
97 size_t getSize()
const override {
return 16; }
105 void update(
const uint8_t* buf,
size_t len)
override;
169 return ChecksumAlgoId::MD4;
Computes a checksum from a byte stream.
Computes a hash from a byte stream.
Computes the MD4 hash from a byte stream.
uint32_t nblocks
Number of blocks.
void finish()
Process the remaining bytes in the internal buffer and the usual prolog according to the standard.
ChecksumAlgoId getID() const override
Returns an unique identifier for the checksum or the hash algorithm.
static constexpr ChecksumAlgoId getIdentifier()
Returns an unique identifier for the hash algorithm.
uint32_t A
First part of the state of computation.
MD4()
Default constructor.
uint32_t D
Fourth part of the state of computation.
int count
Current size of the input buffer.
std::string getName() const override
Returns the name of the checksum or the hash algorithm.
uint8_t * getValue(uint8_t *buffer) const override
Returns the MD4 hash value in the first 16 bytes of the given address.
size_t getSize() const override
Returns the minimal size to allocate in memory to store the hash with the getValue(buffer) method.
static Checksum * getNewInstance()
Gets a new instance of this class.
void update(const uint8_t *buf, size_t len) override
Updates the MD4 hash with specified array of bytes.
uint32_t B
Second part of the state of computation.
uint8_t ibuffer[64]
Input buffer.
uint32_t C
Third part of the state of computation.
void transform(uint8_t *data)
Transform the message X which consists of 16 32-bit-words.
static std::string getHashName()
Returns the name of the hash algorithm.
void reset() override
Resets the MD4 hash to initial state of computation.
Interface for classes from the Libgcrypt that compute hashes.
ChecksumAlgoId
Ids of algorithms of checksums.