fs/hash: fix xxh128 hasher size

This commit is contained in:
Yuhang Cao
2026-06-15 08:14:03 +02:00
committed by albertony
parent 16091ce365
commit 710514afb3
+5
View File
@@ -114,6 +114,11 @@ func (h *xxh128Hasher) Sum(b []byte) []byte {
return buf[:]
}
// Size returns the number of bytes Sum will return.
func (h *xxh128Hasher) Size() int {
return 16
}
func init() {
MD5 = RegisterHash("md5", "MD5", 32, md5.New)
SHA1 = RegisterHash("sha1", "SHA-1", 40, sha1.New)