tests: add testing of data integrity after verify.

[Removed unused variable and replaced loop with memcmp() - BØB]
sha1: don't mangle input buffer.

The SHA-1 update would use the input data as intermediate storage
in the transform stage, which made the data useless after processing.
Avoid this by adding an extra memcpy() in the inner loop of the update()
function. We are using the same context buffer that is already in use
for data that falls outside of the block size.