[update] 清理了一些无用文件

This commit is contained in:
piexlMax
2023-08-31 18:17:06 +08:00
parent 7808fbb852
commit c4aeeb419e
13 changed files with 172 additions and 321 deletions

View File

@@ -1,6 +1,8 @@
package utils
import (
"crypto/md5"
"encoding/hex"
"golang.org/x/crypto/bcrypt"
)
@@ -15,3 +17,15 @@ func BcryptCheck(password, hash string) bool {
err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
return err == nil
}
//@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))
}