Documentation ¶
Overview ¶
Simple wrapper around golang's bcrypt library
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BcryptHasher ¶
type BcryptHasher struct {
// contains filtered or unexported fields
}
func NewBcryptHasher ¶
func NewBcryptHasher(cost int) *BcryptHasher
func (*BcryptHasher) Hash ¶
func (b *BcryptHasher) Hash(p string) (string, error)
Some cryptic hash value would be the first return value of the expression While an error would be the second. The hash was successful only if the error equals nil
Example ¶
hasher := &BcryptHasher{19} hasher.Hash("*72t723c(#fji3)@")
Output:
Click to show internal directories.
Click to hide internal directories.