This commit is contained in:
2026-05-31 20:01:28 +00:00
parent e7ec6083cb
commit db5ecd3dfd
28 changed files with 2090 additions and 2155 deletions

View File

@@ -1,6 +1,7 @@
package util
import (
"hash"
"hash/crc32"
)
@@ -15,3 +16,7 @@ func CalcChecksum(page []byte) uint32 {
func IsValidChecksum(page []byte, checksum uint32) bool {
return crc32.Checksum(page, castagnoliTable) == checksum
}
func NewHasher() hash.Hash32 {
return crc32.New(castagnoliTable)
}