crc32a fn name changed
This commit is contained in:
parent
3831c4ca5d
commit
cc7d7b6bd4
@ -14,10 +14,14 @@ func CheckCRC32A(data []byte) uint32 {
|
||||
return binary.BigEndian.Uint32(b)
|
||||
}
|
||||
|
||||
// CheckCRC32AHex is a convenience function that outputs CRC32A (ITU I.363.5 algorithm, popularized by BZIP2) checksum as a hex string.
|
||||
func Crc32A(data []byte) []byte {
|
||||
return digest(data)
|
||||
}
|
||||
|
||||
// Crc32AStr is a convenience function that outputs CRC32A (ITU I.363.5 algorithm, popularized by BZIP2) checksum as a hex string.
|
||||
// This function will produce the same results as following PHP code:
|
||||
// hash('crc32', $data)
|
||||
func ChecksumHex(data []byte) string {
|
||||
func Crc32AStr(data []byte) string {
|
||||
b := digest(data)
|
||||
|
||||
return hex.EncodeToString(b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user