X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost28147%2Fcbc_test.go;h=10b3fde1c19121f54b98abc4522be9038ab8380c;hb=HEAD;hp=8a962e3fe9145a56427966dd003243ad41dbf3f6;hpb=c40d1e5634cf6d540d908a57423f4b504e39f186;p=gogost.git diff --git a/gost28147/cbc_test.go b/gost28147/cbc_test.go index 8a962e3..739444a 100644 --- a/gost28147/cbc_test.go +++ b/gost28147/cbc_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 @@ -33,7 +33,7 @@ func TestCBCCrypter(t *testing.T) { e.CryptBlocks(ct, pt) d := cipher.NewCBCDecrypter(c, iv[:]) d.CryptBlocks(ct, ct) - return bytes.Compare(pt, ct) == 0 + return bytes.Equal(pt, ct) } if err := quick.Check(f, nil); err != nil { t.Error(err)