X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost341264%2Fcipher_test.go;h=25392f067d9ce923efc06ad4864dc424eea3dca7;hb=d681002980ca0b115936a6e217de5649bb8966d3;hp=1bcf3c8b1c6dd5a0bfdc9dd1b3bf7d1cb1ddf4f5;hpb=5afe1dcbfaf1043ed9e72e215a285966eaba3369;p=gogost.git diff --git a/gost341264/cipher_test.go b/gost341264/cipher_test.go index 1bcf3c8..25392f0 100644 --- a/gost341264/cipher_test.go +++ b/gost341264/cipher_test.go @@ -1,5 +1,5 @@ // GoGOST -- Pure Go GOST cryptographic functions library -// Copyright (C) 2015-2023 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 @@ -37,11 +37,11 @@ func TestVector(t *testing.T) { c := NewCipher(key) dst := make([]byte, BlockSize) c.Encrypt(dst, pt[:]) - if bytes.Compare(dst, ct[:]) != 0 { + if !bytes.Equal(dst, ct[:]) { t.FailNow() } c.Decrypt(dst, dst) - if bytes.Compare(dst, pt[:]) != 0 { + if !bytes.Equal(dst, pt[:]) { t.FailNow() } }