password

package
v1.9.16 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PasswordHashLen - Seed Len in bytes.
	PasswordHashLen = 32

	// PasswordNonce - Password nonce.
	PasswordNonce = "экзистенциальный кризис трансцендентального эго"
)
View Source
const (
	DefaultArgon2Times   = 1
	DefaultArgon2Mem     = 64 * 1024
	DefaultArgon2Threads = 4
	DefaultArgon2SaltLen = 16 // bytes
)

Argon2 constants.

Variables

This section is empty.

Functions

func NewPasswordHash

func NewPasswordHash(password []byte, seedLen uint32) (string, []byte)

NewPasswordHash - generate a salt and a password hash using Argon2 with gnerated salt.

func PasswordHash

func PasswordHash(password, salt []byte, seedLen uint32) string

PasswordHash - generate a password hash using Argon2.

func PasswordSalt

func PasswordSalt() []byte

PasswordSalt - generate a random salt for Argon2.

Types

This section is empty.

Jump to

Keyboard shortcuts

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