]> Cypherpunks.ru repositories - gogost.git/blobdiff - gost341264/cipher_test.go
Download link for 5.14.1 release
[gogost.git] / gost341264 / cipher_test.go
index 4fff1111bff56e6a4d004af13567ed0548824f3d..25392f067d9ce923efc06ad4864dc424eea3dca7 100644 (file)
@@ -1,5 +1,5 @@
 // GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2019 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
@@ -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()
        }
 }