]> Cypherpunks.ru repositories - gogost.git/blobdiff - gost28147/cbc_test.go
Download link for 5.14.1 release
[gogost.git] / gost28147 / cbc_test.go
index ae019b2112f63fb5e03de4e29e0567962860dc57..739444a81b2e1c8d4d912c04945cbc6f5a8d4308 100644 (file)
@@ -1,5 +1,5 @@
 // GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2023 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2024 Sergey Matveev <stargrave@stargrave.org>
 //
 // 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)