Add Linus' optimized sha1 hash for checksum
It does appear to be pretty fast.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/verify.h b/verify.h
index 50c8e43..c12bc7d 100644
--- a/verify.h
+++ b/verify.h
@@ -15,6 +15,7 @@
VERIFY_SHA256, /* sha256 sum data blocks */
VERIFY_SHA512, /* sha512 sum data blocks */
VERIFY_META, /* block_num, timestamp etc. */
+ VERIFY_SHA1, /* sha1 sum data blocks */
VERIFY_NULL, /* pretend to verify */
};
@@ -38,6 +39,9 @@
struct vhdr_sha256 {
uint8_t sha256[128];
};
+struct vhdr_sha1 {
+ uint32_t sha1[5];
+};
struct vhdr_crc64 {
uint64_t crc64;
};