Use whole array as hash

This commit is contained in:
Jan Bader 2016-12-20 16:40:33 +01:00
parent 6a8818dab6
commit 83c36f00bf

View File

@ -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
}