taoshihan

下面这个工具包下的函数

package utils

import (
    "crypto/md5"
    "encoding/hex"
)

//md5加密
func Md5(src string) string {
    m := md5.New()
    m.Write([]byte(src))
    res := hex.EncodeToString(m.Sum(nil))
    return res
}

 

pass:=utils.Md5("test")

 

分类:

技术点:

相关文章:

  • 2022-01-24
  • 2021-10-17
  • 2021-11-01
  • 2021-12-31
  • 2021-09-29
  • 2021-12-12
  • 2021-10-01
  • 2021-10-01
猜你喜欢
  • 2021-11-17
  • 2021-07-09
  • 2022-12-23
  • 2023-03-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
相关资源
相似解决方案