zhangqian
2024-03-18 c0c3aa336e22aa7be4c90018c19124745cfcd091
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package utils
 
import (
    "crypto/md5"
    "encoding/hex"
)
 
//@author: [piexlmax](https://github.com/piexlmax)
//@function: MD5V
//@description: md5加密
//@param: str []byte
//@return: string
 
func MD5V(str []byte, b ...byte) string {
    h := md5.New()
    h.Write(str)
    return hex.EncodeToString(h.Sum(b))
}