Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDerivedKey ¶
CreateDerivedKey creates an encoded derived key with a random hash for the password.
func IsDerivedKey ¶ added in v0.2.0
func ParseDerivedKey ¶
func ParseDerivedKey(encoded string) (dk, salt []byte, time, memory uint32, threads uint8, err error)
ParseDerivedKey returns the parts of the encoded derived key string.
func VerifyDerivedKey ¶
VerifyDerivedKey checks that the submitted password matches the derived key.
Types ¶
type PasswordStrength ¶ added in v0.2.0
type PasswordStrength uint8
const ( Weak PasswordStrength = iota Poor Fair Moderate Strong Excellent )
func Strength ¶ added in v0.2.0
func Strength(password string) PasswordStrength
Strength is currently a very simple password strength algorithm that simply checks the length and contents of a password to ensure that reasonable passwords are added to Quarterdeck. In the future this algorithm can be strengthened with zxcvbn algorithms. TODO: implement dictionary word, spatial closeness, and l33t strength algorithms. See: https://nulab.com/learn/software-development/password-strength/
Click to show internal directories.
Click to hide internal directories.