Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BcryptHasher ¶
type BcryptHasher struct { }
func (*BcryptHasher) Check ¶
func (b *BcryptHasher) Check(value, hashedValue string) bool
Check returns true if the value matches the hashed value.
func (*BcryptHasher) Make ¶
func (b *BcryptHasher) Make(value string) (string, error)
Make returns the hashed value.
func (*BcryptHasher) MakeWithCost ¶
func (b *BcryptHasher) MakeWithCost(value string, cost int) (string, error)
MakeWithCost returns the hashed value with the given cost.
func (*BcryptHasher) MustMake ¶
func (b *BcryptHasher) MustMake(value string) string
MustMake returns the hashed value.
type Hasher ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
NewManager creates a new hashing manager instance. config example:
config := &Config{ Driver: "bcrypt", }
Click to show internal directories.
Click to hide internal directories.