24 #ifndef INC_SHA384_512_HPP_4C735FA2_1C10_4B7A_B78C_F6FBF70A87EC
25 #define INC_SHA384_512_HPP_4C735FA2_1C10_4B7A_B78C_F6FBF70A87EC
73 void update(
const uint8_t* buf,
size_t len)
override final;
127 void reset()
override;
137 uint8_t*
getValue(uint8_t* buffer)
const override;
146 size_t getSize()
const override {
return 48; }
210 return ChecksumAlgoId::SHA2_384;
262 void reset()
override;
272 uint8_t*
getValue(uint8_t* buffer)
const override;
281 size_t getSize()
const override {
return 64; }
346 return ChecksumAlgoId::SHA2_512;
Computes the SHA512 hash from a byte stream.
uint64_t h4
Fifth part of the state of computation.
void transform(uint8_t *data)
Transform the message X which consists of 16 64-bit-words.
uint64_t h7
Eighth part of the state of computation.
int count
Current size of the input buffer.
void update(const uint8_t *buf, size_t len) override final
Updates the SHA512 hash with specified array of bytes.
uint64_t h2
Third part of the state of computation.
void finish()
Process the remaining bytes in the internal buffer and the usual prolog according to the standard.
uint64_t h6
Seventh part of the state of computation.
uint64_t h5
Sixth part of the state of computation.
uint64_t nblocks
Number of blocks.
uint64_t h1
Second part of the state of computation.
void reset() override=0
Resets the checksum to initial value.
uint64_t h0
First part of the state of computation.
uint64_t h3
Fourth part of the state of computation.
uint8_t ibuffer[128]
Input buffer.
Computes a checksum from a byte stream.
Computes a hash from a byte stream.
Computes the SHA384 hash from a byte stream.
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.
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 SHA384 hash value in the first 48 bytes of the given address.
static Checksum * getNewInstance()
Gets a new instance of this class.
static ArrayString getAlternativeNames()
Returns the alternative names of the SHA384 hash algorithm.
void reset() override
Resets the SHA384 hash to initial state of computation.
size_t getSize() const override
Returns the minimal size to allocate in memory to store the hash with the getValue(buffer) method.
static std::string getHashName()
Returns the name of the hash algorithm.
SHA384()
Default constructor.
ArrayString getAltNames() const override
Returns the alternative names of the SHA384 hash algorithm.
Computes the SHA512 hash from a byte stream.
static constexpr ChecksumAlgoId getIdentifier()
Returns an unique identifier for the hash algorithm.
static Checksum * getNewInstance()
Gets a new instance of this class.
SHA512()
Default constructor.
static ArrayString getAlternativeNames()
Returns the alternative names of the SHA512 hash algorithm.
std::string getName() const override
Returns the name of the checksum or the hash algorithm.
static std::string getHashName()
Returns the name of the hash algorithm.
uint8_t * getValue(uint8_t *buffer) const override
Returns the SHA512 hash value in the first 64 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.
void reset() override
Resets the SHA512 hash to initial state of computation.
ChecksumAlgoId getID() const override
Returns an unique identifier for the checksum or the hash algorithm.
ArrayString getAltNames() const override
Returns the alternative names of the SHA512 hash algorithm.
Interface for classes from the Libgcrypt that compute hashes.
ChecksumAlgoId
Ids of algorithms of checksums.
std::vector< std::string > ArrayString
Array of strings.