crypro

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Slat = "mscommunity!@#$%"

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash 验证密码是否匹配

func DecryptString

func DecryptString(key, ciphertext string) (string, error)

解密字符串

func EncryptString

func EncryptString(key, plaintext string) (string, error)

EncryptString 加密字符串

func HashPassword

func HashPassword(password string) (string, error)

HashPassword 使用 bcrypt 生成哈希密码

func Md5

func Md5(data []byte) string

func Md5WithSalt

func Md5WithSalt(data, salt string) string

Md5WithSalt 使用 MD5 和 salt 进行哈希

func Sha1

func Sha1(input string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL