passwordpkg

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashedPassword, password string) error

Compare 比较密码

func Encrypt

func Encrypt(password string) ([]byte, error)

Encrypt 加密密码

func Verify

func Verify(hashed, plain string) bool

Verify 验证

Types

type PasswordHash

type PasswordHash struct{}

PasswordHash 密码验证

func NewPasswordHash

func NewPasswordHash() *PasswordHash

NewPasswordHash 密码验证

func (*PasswordHash) Encrypt

func (e *PasswordHash) Encrypt(src string) (string, error)

func (*PasswordHash) Verify

func (e *PasswordHash) Verify(hashed, plain string) bool

Jump to

Keyboard shortcuts

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