md5.go 273 B

123456789101112131415
  1. package main
  2. import (
  3. "crypto/md5"
  4. "encoding/hex"
  5. )
  6. func main() {
  7. str := "wph_esp_177F64a9CF5c_4187724128Yeafw93#d392207127"
  8. md5Ctx := md5.New()
  9. md5Ctx.Write([]byte(str))
  10. encryptPwd := md5Ctx.Sum(nil)
  11. pwdmd5 := hex.EncodeToString(encryptPwd[:])
  12. println(pwdmd5)
  13. }