Use whole array as hash
This commit is contained in:
parent
6a8818dab6
commit
83c36f00bf
@ -1,10 +1,6 @@
|
||||
package bcrypt
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
import "golang.org/x/crypto/bcrypt"
|
||||
|
||||
// Verifier verifys passwords using Bcrypt
|
||||
type Verifier struct {
|
||||
@ -22,6 +18,6 @@ func (bv *Verifier) Hash(password string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
idx := bytes.IndexByte(hash, 0)
|
||||
return string(hash[:idx]), nil
|
||||
|
||||
return string(hash[:]), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user