password

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCompareFailed = errors.New("crypt compare failed")

ErrCompareFailed compare failed

Functions

func CompareHashAndPassword

func CompareHashAndPassword(hashedPassword, password string) error

CompareHashAndPassword password hash verification

func CompareSCryptHashAndPassword

func CompareSCryptHashAndPassword(hashedPassword, password string) error

CompareSCryptHashAndPassword password hash verification

func CompareSimpleHashAndPassword

func CompareSimpleHashAndPassword(hashedPassword, password string) error

CompareHashAndPassword Compare password hash verification

func GenerateFromPassword

func GenerateFromPassword(password string) (string, error)

GenerateFromPassword password hash encryption

func GenerateSCryptFromPassword

func GenerateSCryptFromPassword(password string) (string, error)

GenerateSCryptFromPassword password hash encryption

func GenerateSimpleFromPassword

func GenerateSimpleFromPassword(password string) (string, error)

GenerateFromPassword generate password hash encryption 加盐法

Types

type Simple

type Simple struct{}

Simple password encryption

Jump to

Keyboard shortcuts

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