From c37c5b9ca34a472732cb8c6c9914af9993d60350 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 15 Apr 2017 20:51:19 +0200 Subject: cleanup --- bhash/bhash.go | 8 ++++---- 1 file 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() -- cgit v1.2.3