X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost341264%2Fcipher_test.go;h=aa5f69d24ad063250e4931238e976e274e18ec6b;hb=HEAD;hp=88425cee8524bd94ca287967159339e76f415e1d;hpb=c40d1e5634cf6d540d908a57423f4b504e39f186;p=gogost.git diff --git a/gost341264/cipher_test.go b/gost341264/cipher_test.go index 88425ce..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-2020 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() } }