zhangqian
2024-05-13 649b262b570d1c463e927a99eb1ede611da31344
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))
}