security

package
v0.0.0-...-8529627 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(src string) (string, error)

Encrypt use golang.org/x/crypto/bcrypt generate password

func Md5

func Md5(src string) string

Md5 生成md5加密

func Md5WithSalt

func Md5WithSalt(src string, salt string) string

Md5WithSalt 加密时简单加盐

func ValidatePassword

func ValidatePassword(plaintext, ciphertext string) bool

ValidatePassword use golang.org/x/crypto/bcrypt compare passwords for equality

Types

This section is empty.

Jump to

Keyboard shortcuts

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