23 #ifndef CRYPTO_SHA256_h
24 #define CRYPTO_SHA256_h
38 void update(
const void *data,
size_t len);
39 void finalize(
void *hash,
size_t len);
43 void resetHMAC(
const void *key,
size_t keyLen);
44 void finalizeHMAC(
const void *key,
size_t keyLen,
void *hash,
size_t hashLen);
Abstract base class for cryptographic hash algorithms.
void resetHMAC(const void *key, size_t keyLen)
Resets the hash ready for a new HMAC hashing process.
void finalizeHMAC(const void *key, size_t keyLen, void *hash, size_t hashLen)
Finalizes the HMAC hashing process and returns the hash.
void update(const void *data, size_t len)
Updates the hash with more data.
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
size_t hashSize() const
Size of the hash result from finalize().
SHA256()
Constructs a SHA-256 hash object.
static const size_t BLOCK_SIZE
Constant for the block size of SHA256.
static const size_t HASH_SIZE
Constant for the size of the hash output of SHA256.
virtual ~SHA256()
Destroys this SHA-256 hash object after clearing sensitive information.
void reset()
Resets the hash ready for a new hashing process.
size_t blockSize() const
Size of the internal block used by the hash algorithm.
void clear()
Clears the hash state, removing all sensitive data, and then resets the hash ready for a new hashing ...
void processChunk()
Processes a single 512-bit chunk with the core SHA-256 algorithm.