Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶ added in v0.8.0
func OptimalCost ¶ added in v0.8.0
Types ¶
type Crypto ¶ added in v0.8.0
type KeyDerivator ¶ added in v0.8.0
type KeySize ¶ added in v0.8.0
type KeySize int
const Key256 KeySize = 256
func (KeySize) NewDerivator ¶ added in v0.8.0
type PasswordHasher ¶ added in v0.8.0
type PasswordHasher interface {
Cost() int
HashPassword(password string) (string, error)
ComparePassword(hashed, password string) error
ShouldUpdateCost(hashed string) (bool, error)
}
func NewPasswordHasher ¶ added in v0.8.0
func NewPasswordHasher(target time.Duration) PasswordHasher
Click to show internal directories.
Click to hide internal directories.