package main import (
"fmt"
"crypto/sha256"
) func main() {
str:="test hash..."
s_ob:=sha256.New()
s_ob.Write([]byte(str))
r:=s_ob.Sum(nil)
fmt.Printf("%x\n",r)
} //sha256: 59039ef3b6f6ab469c357616b365b4b59a28c32d8ee880160ec793d1d543fc8d7474ffcf52f55532f49f6c627cbf0c3d10cc10b6704a793d11bb6800b09916cc
//sha256:
相关文章
- 03-19go语言练习:sha256、sha512哈希算法
- 03-19go语言练习:文件哈希