github.com/bodgit/sevenzip@v1.5.1/internal/util/checksum.go (about) 1 package util 2 3 import "bytes" 4 5 // CRC32Equal compares CRC32 checksums. 6 func CRC32Equal(b []byte, c uint32) bool { 7 return bytes.Equal(b, []byte{byte(0xff & (c >> 24)), byte(0xff & (c >> 16)), byte(0xff & (c >> 8)), byte(0xff & c)}) 8 }