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 HashProvider ¶ added in v0.5.0
type HashProvider struct {
// contains filtered or unexported fields
}
HashProvider represents the hashing provider.
func NewHashProvider ¶
func NewHashProvider(c *container.Container) *HashProvider
NewHashProvider Bootstrap bootstraps the hashing services.
func (*HashProvider) Boot ¶ added in v0.5.0
func (p *HashProvider) Boot()
func (*HashProvider) Register ¶ added in v0.5.0
func (p *HashProvider) Register()
Register registers the hashing services into the application.
type Hasher ¶
type Manager ¶ added in v0.4.1
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶ added in v0.4.1
NewManager creates a new hashing manager instance. config example:
config := &Config{ Driver: "bcrypt", }
type Md5Hasher ¶ added in v0.1.1
type Md5Hasher struct { }
func NewMd5Hasher ¶ added in v0.1.1
func NewMd5Hasher() *Md5Hasher
NewMd5Hasher creates a new md5 hasher instance.
Click to show internal directories.
Click to hide internal directories.