Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxTimeout default max timeout in ms DefaultMaxTimeout = 500 * time.Millisecond // DefaultMaxMemory default max memory in MB DefaultMaxMemory = 64 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Passwords ¶
type Passwords interface { CreatePassword(password string) (string, error) CheckPassword(hash, password string) error }
Passwords is an interface for creating and verifying secure passwords An implementation must implement all methods and it is up to the impl which underlying crypto to use for hasing cleartext passwrods.
func NewScryptPasswords ¶
NewScryptPasswords ...
type ScryptPasswords ¶
type ScryptPasswords struct {
// contains filtered or unexported fields
}
ScryptPasswords ...
func (*ScryptPasswords) CheckPassword ¶
func (sp *ScryptPasswords) CheckPassword(hash, password string) error
CheckPassword ...
func (*ScryptPasswords) CreatePassword ¶
func (sp *ScryptPasswords) CreatePassword(password string) (string, error)
CreatePassword ...
Click to show internal directories.
Click to hide internal directories.