Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PasswordHasher ¶
type PasswordHasher interface { // ID returns a string that uniquely identifies this plugin. ID() string // HashPassword returns a hashed value that can be (safely?) stored in a database HashPassword(plaintext string) (ciphertext string, error error) // CompareHashedValue checks that a plaintext value matches a stored ciphertext value. // OK returns TRUE if the values match. Rehash returns TRUE if the hashing criteria has been updated // and a new hashed value should be stored in its place. CompareHashedPassword(plaintext string, ciphertext string) (OK bool, Rehash bool) }
PasswordHasher handles all encryption functions for passwords.
type PasswordRule ¶
type PasswordRule interface { // ID returns a string that uniquely identifies this plugin. ID() string // PasswordRuleDescription returns a map of language tags to human-readable strings that explain how the password can be used PasswordRuleDescription(language string) string // ValidatePassword returns TRUE if the password can be used in this system. If not, it returns FALSE, and a message explaining why ValidatePassword(password string) (OK bool, errorMessage string) }
PasswordRule is used to verify if a password meets the password complexity criteria for this system.
Click to show internal directories.
Click to hide internal directories.