security

package
v0.0.0-...-b5678d6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(cfg Config, plainPassword string) (string, error)

func IsEqual

func IsEqual(hashedPassword, plainPassword string) bool

Types

type Config

type Config struct {
	SaltLength   uint32 `yaml:"saltLength" env:"SALT_LENGTH" env-default:"16"`
	ArgonTime    uint32 `yaml:"argonTime" env:"ARGON_TIME" env-default:"1"`
	ArgonMemory  uint32 `yaml:"argonMemory" env:"ARGON_MEMORY" env-default:"65536"`
	ArgonThreads uint8  `yaml:"argonThreads" env:"ARGON_THREADS" env-default:"4"`
	ArgonKeyLen  uint32 `yaml:"argonKeyLen" env:"ARGON_KEY_LEN" env-default:"32"`
}

Jump to

Keyboard shortcuts

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