aboutsummaryrefslogtreecommitdiff
path: root/bhash
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-15 20:51:19 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-15 20:51:19 +0200
commitc37c5b9ca34a472732cb8c6c9914af9993d60350 (patch)
tree1118fb58d9e5c646f6274928da35c63504c31c11 /bhash
parent98dc928a4c024f5e1bcbdd58051a075e12f2f48c (diff)
cleanup
Diffstat (limited to 'bhash')
-rw-r--r--bhash/bhash.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bhash/bhash.go b/bhash/bhash.go
index f5fb395..a9369ab 100644
--- a/bhash/bhash.go
+++ b/bhash/bhash.go
@@ -33,14 +33,14 @@ func Hash(pass, salt []byte) []byte {
// encryption
buf := new(bytes.Buffer)
for n := 0; n < len(magic)/words; n++ {
- b := make([]byte, words)
- copy(b, magic[n*words:(n+1)*words])
+ v := make([]byte, words)
+ copy(v, magic[n*words:(n+1)*words])
for i := 0; i < rounds; i++ {
- c.Encrypt(b, b)
+ c.Encrypt(v, v)
}
// swap bytes and copy out
var u [2]uint32
- binary.Read(bytes.NewReader(b), binary.BigEndian, &u)
+ binary.Read(bytes.NewReader(v), binary.BigEndian, &u)
binary.Write(buf, binary.LittleEndian, u)
}
return buf.Bytes()