diff options
author | lloyd <[email protected]> | 2008-06-10 16:23:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-10 16:23:59 +0000 |
commit | 2aef9fa5bc25984a838a51a93ac0e918d2d1bbac (patch) | |
tree | 9f0b9035c4549380de6c62a7bf941a9396b8f554 /include/rsa.h | |
parent | 7ab69d77956048fdc27f49a07724d6b21549b916 (diff) |
Pass RandomNumberGenerator references to public key operations that need
them (encrypt and sign), with the intent of slowly bubbling up the access
points to the API level, at which point the application handles managing
the RNG. This will allow removing the compiled-in global PRNG, and
make testing much simpler.
Diffstat (limited to 'include/rsa.h')
-rw-r--r-- | include/rsa.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/rsa.h b/include/rsa.h index e9f92db51..7ca8068f9 100644 --- a/include/rsa.h +++ b/include/rsa.h @@ -20,7 +20,9 @@ class BOTAN_DLL RSA_PublicKey : public PK_Encrypting_Key, public: std::string algo_name() const { return "RSA"; } - SecureVector<byte> encrypt(const byte[], u32bit) const; + SecureVector<byte> encrypt(const byte[], u32bit, + RandomNumberGenerator& rng) const; + SecureVector<byte> verify(const byte[], u32bit) const; RSA_PublicKey() {} @@ -38,8 +40,10 @@ class BOTAN_DLL RSA_PrivateKey : public RSA_PublicKey, public IF_Scheme_PrivateKey { public: + SecureVector<byte> sign(const byte[], u32bit, + RandomNumberGenerator&) const; + SecureVector<byte> decrypt(const byte[], u32bit) const; - SecureVector<byte> sign(const byte[], u32bit) const; bool check_key(RandomNumberGenerator& rng, bool) const; |