Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultAlgorithm defines the default algorithm to use when not specified DefaultAlgorithm = hasher.Pbkdf2Blake2b512 )
Variables ¶
View Source
var ( // DefaultNonce defines the default nonce generation factory to use when not specified DefaultNonce = RandomNonce(64) )
View Source
var ( // ErrButcherStrategyNotSupported is raised when caller try to invoke not supported algorithm ErrButcherStrategyNotSupported = errors.New("butcher: given strategy is not supported") )
Functions ¶
func FixedNonce ¶
FixedNonce returns a nonce factory that returns the given salt
func NeedsUpgrade ¶
NeedsUpgrade returns the password hash upgrade need when DefaultAlgorithm is changed
func RandomNonce ¶
RandomNonce returns a nonce factory that returns a random length bound salt
Types ¶
type Butcher ¶
type Butcher struct {
// contains filtered or unexported fields
}
Butcher defines the hasher configuration
type Option ¶
Option is the butcher option setting function signature
func WithAlgorithm ¶
WithAlgorithm defines the algorithm to use for hashing password
Click to show internal directories.
Click to hide internal directories.