diff --git a/go.mod b/go.mod index 2efd14d..9b4f052 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/reecerussell/adaptive-password-hasher go 1.14 require ( - github.com/golang/mock v1.4.4 // indirect + github.com/golang/mock v1.4.4 golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 ) diff --git a/hasher.go b/hasher.go index 66d3eef..3d09571 100644 --- a/hasher.go +++ b/hasher.go @@ -162,7 +162,6 @@ func (h *hasher) Verify(pwd, hash []byte) (ok bool) { } hashFunc, iterCnt, saltLen := scanHeader(hash) - fmt.Printf("%d < %d\n", saltLen, h.saltSize) if saltLen < h.saltSize { // saltLen must be >= to the hasher's salt size. return false @@ -192,13 +191,10 @@ func scanHeader(buf []byte) (hashAlg func() hash.Hash, iterCnt, saltSize int) { switch i { case 1: hashAlg = alg(v) - break case 5: iterCnt = v - break case 9: saltSize = v - break } }