Optional
digestConstant length of the digest created by the algorithm in bytes.
Optional
copyOptional
markAdds a chunk of data for which checksum needs to be computed. This can be called many times with new data as it is streamed.
Implementations may override this method which passes second param which makes Checksum object stateless.
The buffer to update checksum with.
An object that provides a checksum of data provided in chunks to
update
. The checksum may be performed incrementally as chunks are received or all at once when the checksum is finalized, depending on the underlying implementation.It's recommended to compute checksum incrementally to avoid reading the entire payload in memory.
A class that implements this interface may accept an optional secret key in its constructor while computing checksum value, when using HMAC. If provided, this secret key would be used when computing checksum.