Some linting fixes
This commit is contained in:
@ -6,17 +6,17 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
// Verifier verifys passwords using Bcrypt
|
||||
// Verifier verifys passwords using Bcrypt.
|
||||
type Verifier struct {
|
||||
cost int
|
||||
}
|
||||
|
||||
// Verify verifys a Password
|
||||
func (bv *Verifier) Verify(password string, hashOnDb string) error {
|
||||
return bcrypt.CompareHashAndPassword([]byte(hashOnDb), []byte(password))
|
||||
// Verify verifys a Password.
|
||||
func (bv *Verifier) Verify(password string, hashOnDB string) error {
|
||||
return bcrypt.CompareHashAndPassword([]byte(hashOnDB), []byte(password))
|
||||
}
|
||||
|
||||
// Hash calculates a hash to be stored on the database
|
||||
// Hash calculates a hash to be stored on the database.
|
||||
func (bv *Verifier) Hash(password string) (string, error) {
|
||||
hash, err := bcrypt.GenerateFromPassword([]byte(password), bv.cost)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user