diff options
author | lloyd <[email protected]> | 2008-06-20 11:24:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-20 11:24:33 +0000 |
commit | 79c7591a0946bb20fd50de136970cc0b1454430a (patch) | |
tree | 4efe62dfcd3f786970cf24062d06061275aead86 /src/if_algo.cpp | |
parent | 850af952f95a3115e509ebd0aa6689a1d2e9c810 (diff) |
Convert pkcs8_decoder() and x509_decoder() to take a RandomNumberGenerator&
reference, along with PKCS8::load_key
get_pbe no longer calls new_params() on the newly instantiated instance,
which is not backwards compatible (you have to either call new_params
yourself, or explicitly set the iteration count, salt, etc)
Diffstat (limited to 'src/if_algo.cpp')
-rw-r--r-- | src/if_algo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/if_algo.cpp b/src/if_algo.cpp index 2bd508c86..e2178e5f1 100644 --- a/src/if_algo.cpp +++ b/src/if_algo.cpp @@ -46,7 +46,7 @@ X509_Encoder* IF_Scheme_PublicKey::x509_encoder() const /************************************************* * Return the X.509 public key decoder * *************************************************/ -X509_Decoder* IF_Scheme_PublicKey::x509_decoder() +X509_Decoder* IF_Scheme_PublicKey::x509_decoder(RandomNumberGenerator& rng) { class IF_Scheme_Decoder : public X509_Decoder { @@ -72,7 +72,7 @@ X509_Decoder* IF_Scheme_PublicKey::x509_decoder() RandomNumberGenerator& rng; }; - return new IF_Scheme_Decoder(this, global_state().prng_reference()); + return new IF_Scheme_Decoder(this, rng); } /************************************************* @@ -117,7 +117,7 @@ PKCS8_Encoder* IF_Scheme_PrivateKey::pkcs8_encoder() const /************************************************* * Return the PKCS #8 public key decoder * *************************************************/ -PKCS8_Decoder* IF_Scheme_PrivateKey::pkcs8_decoder() +PKCS8_Decoder* IF_Scheme_PrivateKey::pkcs8_decoder(RandomNumberGenerator& rng) { class IF_Scheme_Decoder : public PKCS8_Decoder { @@ -154,7 +154,7 @@ PKCS8_Decoder* IF_Scheme_PrivateKey::pkcs8_decoder() RandomNumberGenerator& rng; }; - return new IF_Scheme_Decoder(this, global_state().prng_reference()); + return new IF_Scheme_Decoder(this, rng); } /************************************************* |