// GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2020 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
pub2, _ := prv2.PublicKey()
kek1, _ := prv1.KEK2001(pub2, ukm)
kek2, _ := prv2.KEK2001(pub1, ukm)
- if bytes.Compare(kek1, kek2) != 0 {
+ if !bytes.Equal(kek1, kek2) {
t.FailNow()
}
- if bytes.Compare(kek1, kek) != 0 {
+ if !bytes.Equal(kek1, kek) {
t.FailNow()
}
}
ukm := NewUKM(ukmRaw[:])
kek1, _ := prv1.KEK2001(pub2, ukm)
kek2, _ := prv2.KEK2001(pub1, ukm)
- return bytes.Compare(kek1, kek2) == 0
+ return bytes.Equal(kek1, kek2)
}
if err := quick.Check(f, nil); err != nil {
t.Error(err)