]> Cypherpunks.ru repositories - gogost.git/blobdiff - gost3410/public.go
Slightly refactored error messages
[gogost.git] / gost3410 / public.go
index 85d3557bfe03c7506e4417ed258c6e62665aa46f..957293e61f7830b266a7f0731729b989dac8d0d0 100644 (file)
@@ -1,5 +1,5 @@
 // GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2023 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
@@ -56,7 +56,7 @@ func (pub *PublicKey) Raw() []byte {
 func (pub *PublicKey) VerifyDigest(digest, signature []byte) (bool, error) {
        pointSize := pub.C.PointSize()
        if len(signature) != 2*pointSize {
-               return false, fmt.Errorf("gogost/gost3410: len(signature) != %d", 2*pointSize)
+               return false, fmt.Errorf("gogost/gost3410: len(signature)=%d != %d", len(signature), 2*pointSize)
        }
        s := bytes2big(signature[:pointSize])
        r := bytes2big(signature[pointSize:])