24 #ifndef INC_TIGER_HPP_25AA767E_5CF0_45CD_860E_2B02008338DA
25 #define INC_TIGER_HPP_25AA767E_5CF0_45CD_860E_2B02008338DA
69 static const uint64_t
sbox1[256];
70 static const uint64_t
sbox2[256];
71 static const uint64_t
sbox3[256];
72 static const uint64_t
sbox4[256];
83 void reset()
override;
93 uint8_t*
getValue(uint8_t* buffer)
const override;
102 size_t getSize()
const override {
return 24; }
110 void update(
const uint8_t* buf,
size_t len)
override;
139 void round(uint64_t&
a, uint64_t&
b, uint64_t&
c, uint64_t x,
int mul);
152 void pass(uint64_t&
a, uint64_t&
b, uint64_t&
c, uint64_t* x,
int mul);
210 return ChecksumAlgoId::Tiger;
Computes a checksum from a byte stream.
Computes a hash from a byte stream.
Computes the Tiger hash from a byte stream.
void update(const uint8_t *buf, size_t len) override
Updates the Tiger hash with specified array of bytes.
void transform(uint8_t *data)
Transform the message X which consists of 8 64-bit-words.
size_t getSize() const override
Returns the minimal size to allocate in memory to store the hash with the getValue(buffer) method.
ChecksumAlgoId getID() const override
Returns an unique identifier for the checksum or the hash algorithm.
void pass(uint64_t &a, uint64_t &b, uint64_t &c, uint64_t *x, int mul)
Helper function for Tiger's computing.
static Checksum * getNewInstance()
Gets a new instance of this class.
static std::string getHashName()
Returns the name of the hash algorithm.
uint8_t ibuffer[64]
Input buffer.
static const uint64_t sbox3[256]
Table used to compute the Tiger hash.
void round(uint64_t &a, uint64_t &b, uint64_t &c, uint64_t x, int mul)
Helper function for Tiger's computing.
Tiger()
Default constructor.
static const uint64_t sbox1[256]
Table used to compute the Tiger hash.
static const uint64_t sbox4[256]
Table used to compute the Tiger hash.
void key_schedule(uint64_t *x)
Helper function for Tiger's computing.
void finish()
Process the remaining bytes in the internal buffer and the usual prolog according to the standard.
uint64_t b
Second part of the state of computation.
uint32_t nblocks
Number of blocks.
static constexpr ChecksumAlgoId getIdentifier()
Returns an unique identifier for the hash algorithm.
int count
Current size of the input buffer.
static const uint64_t sbox2[256]
Table used to compute the Tiger hash.
uint64_t a
First part of the state of computation.
std::string getName() const override
Returns the name of the checksum or the hash algorithm.
uint64_t c
Third part of the state of computation.
uint8_t * getValue(uint8_t *buffer) const override
Returns the Tiger hash value in the first 24 bytes of the given address.
void reset() override
Resets the Tiger hash to initial state of computation.
Interface for classes from the Libgcrypt that compute hashes.
ChecksumAlgoId
Ids of algorithms of checksums.