aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/rsa/rsa.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-04 03:49:35 +0000
committerlloyd <[email protected]>2010-03-04 03:49:35 +0000
commitfe9aa5acece6c004f2c1c1aa4b23d7c44207672f (patch)
tree56bf2fc8378d965138e29074c23f645ed5d1a947 /src/pubkey/rsa/rsa.h
parentde89566f633d5ed807ca57a59cc1071f79fdded3 (diff)
Add similar decoding constructors to the private keys
Diffstat (limited to 'src/pubkey/rsa/rsa.h')
-rw-r--r--src/pubkey/rsa/rsa.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pubkey/rsa/rsa.h b/src/pubkey/rsa/rsa.h
index c24dc7d0c..33a049efe 100644
--- a/src/pubkey/rsa/rsa.h
+++ b/src/pubkey/rsa/rsa.h
@@ -58,11 +58,13 @@ class BOTAN_DLL RSA_PrivateKey : public RSA_PublicKey,
bool check_key(RandomNumberGenerator& rng, bool) const;
- /**
- * Default constructor, does not set any internal values. Use this
- * constructor if you wish to decode a DER or PEM encoded key.
- */
- RSA_PrivateKey() {}
+ RSA_PrivateKey(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits,
+ RandomNumberGenerator& rng) :
+ IF_Scheme_PrivateKey(alg_id, key_bits)
+ {
+ PKCS8_load_hook(rng);
+ }
/**
* Construct a private key from the specified parameters.