package main
import (
"fmt"
"hash/crc32"
"io")
func main(){
//hash := crc32.NewIEEE()
check_str := "Discard medicine more than two years old."
//hash.write(check_str)
//hash.Sum()
ieee := crc32.NewIEEE()
io.WriteString(ieee, check_str)
s := ieee.Sum32()
fmt.Println("IEEE(%s) = 0x%x",check_str,s)
}
go语言使用crc32得到网络消息的校验码
最新推荐文章于 2023-11-17 15:34:07 发布