174 uint8_t *b = (uint8_t *)block;
175 memset(b + len, pad, size - len);
virtual size_t hashSize() const =0
Size of the hash result from finalize().
void formatHMACKey(void *block, const void *key, size_t len, uint8_t pad)
Formats a HMAC key into a block.
virtual size_t blockSize() const =0
Size of the internal block used by the hash algorithm.
virtual void finalize(void *hash, size_t len)=0
Finalizes the hashing process and returns the hash.
Hash()
Constructs a new hash object.
virtual ~Hash()
Destroys this hash object.
virtual void reset()=0
Resets the hash ready for a new hashing process.
virtual void update(const void *data, size_t len)=0
Updates the hash with more data.
void * memcpy(void *a, const void *b, size_t c)