Documentation ¶
Overview ¶
Package security provides crypto and hashing support
Index ¶
- Constants
- func Decrypt(e string, key []byte) (string, error)
- func DerivePassword(password string, cfg argon2.Config) (string, error)
- func EncodedSHA256(s string) string
- func Encrypt(s string, key []byte) (string, error)
- func MakeKey(s string) ([]byte, error)
- func SafeStr(s string) bool
- func VerifyPassword(guess, derived string) (bool, error)
Constants ¶
View Source
const KeyLen = 32
KeyLen is the encryption key length
Variables ¶
This section is empty.
Functions ¶
func DerivePassword ¶
DerivePassword performs a one-way hash on a password using argon2
func EncodedSHA256 ¶
EncodedSHA256 returns the encoded (base16) sha256sums
func VerifyPassword ¶
VerifyPassword returns true if guess is the same as the password forming derived
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.