Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultHasher = NewBcryptHasher(bcrypt.DefaultCost)
)
Functions ¶
func CompareString ¶
func HashString ¶
Types ¶
type BcryptHasher ¶
type BcryptHasher struct {
Cost int
}
func NewBcryptHasher ¶
func NewBcryptHasher(cost int) *BcryptHasher
func (*BcryptHasher) Compare ¶
func (bh *BcryptHasher) Compare(hashed, source []byte) error
func (*BcryptHasher) CompareString ¶
func (bh *BcryptHasher) CompareString(hashed, source string) error
func (*BcryptHasher) HashString ¶
func (bh *BcryptHasher) HashString(str string) (string, error)
Click to show internal directories.
Click to hide internal directories.