X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost28147%2Fcbc_test.go;h=10b3fde1c19121f54b98abc4522be9038ab8380c;hb=HEAD;hp=ae019b2112f63fb5e03de4e29e0567962860dc57;hpb=5afe1dcbfaf1043ed9e72e215a285966eaba3369;p=gogost.git diff --git a/gost28147/cbc_test.go b/gost28147/cbc_test.go index ae019b2..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-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 @@ -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)