From 8df87a70435cae25e30f7045f7799537857e13d4 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 5 Mar 2010 16:40:49 +0000 Subject: Constify sign and verify ops --- src/pubkey/gost_3410/gost_3410.cpp | 7 +++---- src/pubkey/gost_3410/gost_3410.h | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/pubkey/gost_3410') diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index 9a7681cb2..c5cc1ddbd 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -78,9 +78,8 @@ GOST_3410_Signature_Operation::GOST_3410_Signature_Operation( } SecureVector -GOST_3410_Signature_Operation::sign(const byte msg[], - u32bit msg_len, - RandomNumberGenerator& rng) +GOST_3410_Signature_Operation::sign(const byte msg[], u32bit msg_len, + RandomNumberGenerator& rng) const { BigInt k; do @@ -118,7 +117,7 @@ GOST_3410_Verification_Operation::GOST_3410_Verification_Operation(const GOST_34 } bool GOST_3410_Verification_Operation::verify(const byte msg[], u32bit msg_len, - const byte sig[], u32bit sig_len) + const byte sig[], u32bit sig_len) const { if(sig_len != order.bytes()*2) return false; diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h index b10421a02..d3309b8f1 100644 --- a/src/pubkey/gost_3410/gost_3410.h +++ b/src/pubkey/gost_3410/gost_3410.h @@ -108,7 +108,7 @@ class BOTAN_DLL GOST_3410_Signature_Operation : public PK_Ops::Signature u32bit max_input_bits() const { return order.bits(); } SecureVector sign(const byte msg[], u32bit msg_len, - RandomNumberGenerator& rng); + RandomNumberGenerator& rng) const; private: const PointGFp& base_point; @@ -128,7 +128,7 @@ class BOTAN_DLL GOST_3410_Verification_Operation : public PK_Ops::Verification bool with_recovery() const { return false; } bool verify(const byte msg[], u32bit msg_len, - const byte sig[], u32bit sig_len); + const byte sig[], u32bit sig_len) const; private: const PointGFp& base_point; const PointGFp& public_point; -- cgit v1.2.3