Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( // ErrBCryptCostOutOfRange can be returned by NewBCryptHasher if provided cost is not between min and max. ErrBCryptCostOutOfRange = errors.New("password: bcrypt cost out of range") )
Functions ¶
This section is empty.
Types ¶
type BCryptHasher ¶
type BCryptHasher struct {
	// contains filtered or unexported fields
}
    BCryptHasher hasher that use BCrypt algorithm to secure password.
func (BCryptHasher) Compare ¶
func (bh BCryptHasher) Compare(hashedPassword, plainPassword []byte) bool
Compare implements Hasher interface.
type Hasher ¶
Hasher define set of methods that object needs to implement to be considered as a hasher.
func NewBCryptHasher ¶
NewBCryptHasher allocates new NewBCryptHasher. If cost is not between min and max value it returns an error.
 Click to show internal directories. 
   Click to hide internal directories.