algorithm

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptPassword

func EncryptPassword(password string) (string, string, error)

加密函数,接收原始密码字符串,返回加密后的密码和盐值

func GenerateRandomBytes added in v0.0.2

func GenerateRandomBytes(n int) ([]byte, error)

func GenerateSigningKey added in v0.0.2

func GenerateSigningKey(keyLength int) (string, error)

func MakePassword

func MakePassword(password string) (string, error)

func SafeGenerateSigningKey added in v0.0.2

func SafeGenerateSigningKey(keyLength int) string

func VerifyEncryptPassword

func VerifyEncryptPassword(secretPassword, inputPassword string) error

func VerifyPassword

func VerifyPassword(encodedHash, encodedSalt, inputPassword string) error

验证函数,接收密文、原始密码和盐值,返回验证结果

Types

This section is empty.

Jump to

Keyboard shortcuts

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