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/rsa | |
parent | ce88e2c6918bb012321e1d7599c2a13b9ba9301e (diff) |
Constify sign and verify ops
Diffstat (limited to 'src/pubkey/rsa')
-rw-r--r-- | src/pubkey/rsa/rsa.cpp | 6 | ||||
-rw-r--r-- | src/pubkey/rsa/rsa.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp index 76165090e..910fddb95 100644 --- a/src/pubkey/rsa/rsa.cpp +++ b/src/pubkey/rsa/rsa.cpp @@ -130,9 +130,9 @@ RSA_Signature_Operation::RSA_Signature_Operation(const RSA_PrivateKey& rsa) : { } -SecureVector<byte> RSA_Signature_Operation::sign(const byte msg[], - u32bit msg_len, - RandomNumberGenerator&) +SecureVector<byte> +RSA_Signature_Operation::sign(const byte msg[], u32bit msg_len, + RandomNumberGenerator&) const { const u32bit n_bytes = (n_bits + 7) / 8; diff --git a/src/pubkey/rsa/rsa.h b/src/pubkey/rsa/rsa.h index c62616cdc..ed7fe9eca 100644 --- a/src/pubkey/rsa/rsa.h +++ b/src/pubkey/rsa/rsa.h @@ -104,7 +104,7 @@ class BOTAN_DLL RSA_Signature_Operation : public PK_Ops::Signature u32bit max_input_bits() const { return (n_bits - 1); } SecureVector<byte> sign(const byte msg[], u32bit msg_len, - RandomNumberGenerator& rng); + RandomNumberGenerator& rng) const; private: const BigInt& q; const BigInt& c; @@ -124,7 +124,7 @@ class BOTAN_DLL RSA_Verification_Operation : public PK_Ops::Verification u32bit max_input_bits() const { return (n_bits - 1); } bool with_recovery() const { return true; } - SecureVector<byte> verify_mr(const byte msg[], u32bit msg_len) + SecureVector<byte> verify_mr(const byte msg[], u32bit msg_len) const { return BigInt::encode(powermod_e_n(BigInt(msg, msg_len))); } |