aboutsummaryrefslogtreecommitdiff
path: root/bhash/bhash.go
diff options
context:
space:
mode:
Diffstat (limited to 'bhash/bhash.go')
-rw-r--r--bhash/bhash.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bhash/bhash.go b/bhash/bhash.go
index 2f1b626..bc4bfe8 100644
--- a/bhash/bhash.go
+++ b/bhash/bhash.go
@@ -51,11 +51,11 @@ func Pbkdf(pass, salt []byte, iter, keyLen int) []byte {
out := make([]byte, hashLen)
buf := new(bytes.Buffer)
- for block := 1; block <= numBlocks; block++ {
+ for n := 1; n <= numBlocks; n++ {
// first round, salt is salt
h.Reset()
h.Write(salt)
- binary.Write(h, binary.BigEndian, uint32(block))
+ binary.Write(h, binary.BigEndian, uint32(n))
tmp := Hash(sha2pass, h.Sum(nil))
copy(out, tmp)