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:
原文地址:https://www.cnblogs.com/chenadong/p/9058383.html
时间: 2024-10-30 00:14:43