package main import ( "crypto/md5" "encoding/hex" "fmt" ) func main() { h := md5.New() h.Write([]byte("hello world")) cipherStr := h.Sum(nil) fmt.Println("*******加密*****", hex.EncodeToString(cipherStr)) // 输出加密结果 }