// GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2016 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2018 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
h.chk = big.NewInt(0)
- h.buf = nil
+ h.buf = h.buf[:0]
}
func (h *Hash) BlockSize() int {
chkBytes := chk.Bytes()
copy(block[BlockSize-len(chkBytes):], chkBytes)
hsh = h.step(hsh, *block)
+ blockReverse(hsh[:], hsh[:])
return append(in, hsh[:]...)
}