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