X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=prfplus%2Fgost_test.go;h=3668b5049102b9a3ee32ef20d69aa686052f62a7;hb=HEAD;hp=4b3f2d612cc03033e4f99384fac10bff292c676c;hpb=6d9056bfe4a2d69469a1e70f3bf08f89b377b06e;p=gogost.git diff --git a/prfplus/gost_test.go b/prfplus/gost_test.go index 4b3f2d6..1d6fd6f 100644 --- a/prfplus/gost_test.go +++ b/prfplus/gost_test.go @@ -1,5 +1,5 @@ // GoGOST -- Pure Go GOST cryptographic functions library -// Copyright (C) 2015-2021 Sergey Matveev +// Copyright (C) 2015-2024 Sergey Matveev // // 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 @@ -32,7 +32,7 @@ func TestPRFIPsecPRFPlusGOSTR34112012256(t *testing.T) { 0x01, 0x26, 0xBD, 0xB8, 0x78, 0x00, 0x1D, 0x80, 0x60, 0x3C, 0x85, 0x44, 0xC7, 0x27, 0x01, 0x00, }) - if bytes.Compare(dst, []byte{ + if !bytes.Equal(dst, []byte{ 0x2D, 0xE5, 0xEE, 0x84, 0xE1, 0x3D, 0x7B, 0xE5, 0x36, 0x16, 0x67, 0x39, 0x13, 0x37, 0x0A, 0xB0, 0x54, 0xC0, 0x74, 0xB7, 0x9B, 0x69, 0xA8, 0xA8, @@ -41,7 +41,7 @@ func TestPRFIPsecPRFPlusGOSTR34112012256(t *testing.T) { 0xAA, 0x2E, 0xF9, 0x5D, 0x7A, 0x59, 0xBE, 0x95, 0x4D, 0xE0, 0x08, 0xF4, 0xA5, 0x0D, 0x50, 0x4D, 0xBD, 0xB6, 0x90, 0xBE, 0x68, 0x06, 0x01, 0x53, - }) != 0 { + }) { t.FailNow() } } @@ -58,7 +58,7 @@ func TestPRFIPsecPRFPlusGOSTR34112012512(t *testing.T) { 0x01, 0x26, 0xBD, 0xB8, 0x78, 0x00, 0x1D, 0x80, 0x60, 0x3C, 0x85, 0x44, 0xC7, 0x27, 0x01, 0x00, }) - if bytes.Compare(dst, []byte{ + if !bytes.Equal(dst, []byte{ 0x5D, 0xA6, 0x71, 0x43, 0xA5, 0xF1, 0x2A, 0x6D, 0x6E, 0x47, 0x42, 0x59, 0x6F, 0x39, 0x24, 0x3F, 0xCC, 0x61, 0x57, 0x45, 0x91, 0x5B, 0x32, 0x59, @@ -75,7 +75,7 @@ func TestPRFIPsecPRFPlusGOSTR34112012512(t *testing.T) { 0x8B, 0xE5, 0xC1, 0xEF, 0xA1, 0xAF, 0xA9, 0x5E, 0xBE, 0x83, 0xE3, 0x9D, 0x00, 0xE1, 0x9A, 0x5D, 0x03, 0xDC, 0xD6, 0x0A, 0x01, 0xBC, 0xA8, 0xE3, - }) != 0 { + }) { t.FailNow() } }