aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-14 15:46:00 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-14 15:46:00 +0200
commit7cf2ddaa85197a694c9a44d2bd7d71862d5d5887 (patch)
treebf7ce25236a107b12c552e42d60e7a8f382f43ed
parent6d0e73cf26f771257995648e0fce401d0428e3db (diff)
cleanup
-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)