diff options
author | lloyd <[email protected]> | 2010-03-05 16:40:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-05 16:40:49 +0000 |
commit | 8df87a70435cae25e30f7045f7799537857e13d4 (patch) | |
tree | ea66d8941cf7c675dcac7e0944139f9b94eb8103 /src/pubkey/dsa | |
parent | ce88e2c6918bb012321e1d7599c2a13b9ba9301e (diff) |
Constify sign and verify ops
Diffstat (limited to 'src/pubkey/dsa')
-rw-r--r-- | src/pubkey/dsa/dsa.cpp | 8 | ||||
-rw-r--r-- | src/pubkey/dsa/dsa.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/pubkey/dsa/dsa.cpp b/src/pubkey/dsa/dsa.cpp index 60414195d..1fbc2abc1 100644 --- a/src/pubkey/dsa/dsa.cpp +++ b/src/pubkey/dsa/dsa.cpp @@ -86,9 +86,9 @@ DSA_Signature_Operation::DSA_Signature_Operation(const DSA_PrivateKey& dsa) : { } -SecureVector<byte> DSA_Signature_Operation::sign(const byte msg[], - u32bit msg_len, - RandomNumberGenerator& rng) +SecureVector<byte> +DSA_Signature_Operation::sign(const byte msg[], u32bit msg_len, + RandomNumberGenerator& rng) const { rng.add_entropy(msg, msg_len); @@ -121,7 +121,7 @@ DSA_Verification_Operation::DSA_Verification_Operation(const DSA_PublicKey& dsa) } bool DSA_Verification_Operation::verify(const byte msg[], u32bit msg_len, - const byte sig[], u32bit sig_len) + const byte sig[], u32bit sig_len) const { const BigInt& q = mod_q.get_modulus(); diff --git a/src/pubkey/dsa/dsa.h b/src/pubkey/dsa/dsa.h index 7745e08ff..290cb5740 100644 --- a/src/pubkey/dsa/dsa.h +++ b/src/pubkey/dsa/dsa.h @@ -69,7 +69,7 @@ class BOTAN_DLL DSA_Signature_Operation : public PK_Ops::Signature u32bit max_input_bits() const { return q.bits(); } SecureVector<byte> sign(const byte msg[], u32bit msg_len, - RandomNumberGenerator& rng); + RandomNumberGenerator& rng) const; private: const BigInt& q; const BigInt& x; @@ -89,7 +89,7 @@ class BOTAN_DLL DSA_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 BigInt& q; const BigInt& y; |