diff --git a/bcrypt/verifier.go b/bcrypt/verifier.go index 51c84fd..60c7a11 100644 --- a/bcrypt/verifier.go +++ b/bcrypt/verifier.go @@ -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 }