X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgogost%2Fgost28147%2Fctr_test.go;h=139bbb984e762e235e32a9c7d237de205841d0cc;hb=1f35967fa918c1653dfa787818ce4f3559283ff5;hp=357d15c0ec8148607165dca258b31dffdd80f19a;hpb=69e668f3499122e0b1140f3bd927de41ad279b94;p=gogost.git diff --git a/src/cypherpunks.ru/gogost/gost28147/ctr_test.go b/src/cypherpunks.ru/gogost/gost28147/ctr_test.go index 357d15c..139bbb9 100644 --- a/src/cypherpunks.ru/gogost/gost28147/ctr_test.go +++ b/src/cypherpunks.ru/gogost/gost28147/ctr_test.go @@ -106,12 +106,12 @@ func TestCTRGCL3Vector(t *testing.T) { tmp := make([]byte, len(plaintext)) ctr.XORKeyStream(tmp, plaintext) if bytes.Compare(tmp, ciphertext) != 0 { - t.Fail() + t.Fatal("encryption failed") } ctr = c.NewCTR(iv) ctr.XORKeyStream(tmp, tmp) if bytes.Compare(tmp, plaintext) != 0 { - t.Fail() + t.Fatal("decryption failed") } } @@ -147,12 +147,12 @@ func TestCTRGCL2Vector(t *testing.T) { tmp := make([]byte, len(plaintext)) ctr.XORKeyStream(tmp, plaintext) if bytes.Compare(tmp, ciphertext) != 0 { - t.Fail() + t.Fatal("encryption failed") } ctr = c.NewCTR(iv[:]) ctr.XORKeyStream(tmp, tmp) if bytes.Compare(tmp, plaintext) != 0 { - t.Fail() + t.Fatal("decryption failed") } }