From 7cf2ddaa85197a694c9a44d2bd7d71862d5d5887 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 14 Apr 2017 15:46:00 +0200 Subject: cleanup --- bhash/bhash.go | 4 ++-- 1 file 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) -- cgit v1.2.3