crypto

package
v0.0.0-...-20a8e94 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordHasher

type PasswordHasher interface {
	HashPassword(password string, salt string) (string, error)
	ComparePassword(password string, hashedPassword string, salt string) (bool, error)
}

func GetPasswordHasher

func GetPasswordHasher(passwordType string) (PasswordHasher, error)

func NewArgon2IDHasher

func NewArgon2IDHasher(memory uint32, iterations uint32, parallelism uint8, saltLength uint32, keyLength uint32) PasswordHasher

func NewBcryptHasher

func NewBcryptHasher(costs int) PasswordHasher

func NewPBKDF2Hasher

func NewPBKDF2Hasher(digest func() hash.Hash, iterations int, keyLen int) PasswordHasher

func NewScryptHasher

func NewScryptHasher(costFactor, blockSize, parallelization, keyLength int) PasswordHasher

Jump to

Keyboard shortcuts

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