1
0
mirror of https://github.com/fumiama/blake2b-simd.git synced 2026-06-11 05:30:37 +08:00

Removed functionality/code for comparing (during dev) to reference code

This commit is contained in:
frankw
2016-06-28 10:01:56 +02:00
parent 0cb28af64e
commit 1953a0fe1e
3 changed files with 5 additions and 1465 deletions

View File

@@ -21,33 +21,12 @@ import (
"testing"
)
func TestCompress(t *testing.T) {
in := make([]byte, 128)
for i := range in {
in[i] = byte(i)
}
hGo := New512(false)
hSSE := New512(true)
hGo.Write(in)
sumGo := fmt.Sprintf("%x", hGo.Sum(nil))
hSSE.Write(in)
sumSSE := fmt.Sprintf("%x", hSSE.Sum(nil))
if sumGo != sumSSE {
t.Errorf("expected %s\ngot %s", sumGo, sumSSE)
}
}
func TestSum(t *testing.T) {
buf := make([]byte, len(golden))
for i := range buf {
buf[i] = byte(i)
}
h := New512(true)
h := New512()
for i, v := range golden {
if v != fmt.Sprintf("%x", Sum512(buf[:i])) {
t.Errorf("%d: Sum512(): \nexpected %s\ngot %x", i, v, Sum512(buf[:i]))