
On 11/13/13 6:03 PM, Christopher Kormanyos wrote: ...
There is another interface detail that can lead to a useful flexibility. In addition to init --- digest --- finalize scheme, some use cases need to finalize a running hash, yet retain its state. This can be accomplished with a kind of function such as "get_result_and_nochange_the_state". In this way, a running hash final result can be obtained, but more bytes can be fed into the hash. This can be a constant member function, as a copy of the hash object needs to be made.
I've this exact situation - currently two hashes are maintained.
If you would like to compare notes, or need some MD5, SHA-1, SHA-256 test cases based on the NIST vectors, or just would like to see a really efficient microcontroller (and PC) implementation, the codes in my git above may useful.
Keep up the good work!
+1 Jeff