argon2

package
v0.0.0-...-d1e1ff0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashWithPassword

func CompareHashWithPassword(hash, password string) (bool, error)

验证密钥

func GenerateSaltedHash

func GenerateSaltedHash(password string) (string, error)

生成密钥

func GenerateSaltedHashWithType

func GenerateSaltedHashWithType(password string, typ string) (string, error)

生成密钥带类型

func GenerateSaltedHashWithTypeAndOpt

func GenerateSaltedHashWithTypeAndOpt(password string, typ string, opt Opt) (string, error)

生成密钥带类型和设置

Types

type Opt

type Opt struct {
	SaltLen int
	Time    uint32
	Memory  uint32
	Threads uint8
	KeyLen  uint32
}

配置

Jump to

Keyboard shortcuts

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