diff options
author | lloyd <[email protected]> | 2008-11-12 20:03:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-12 20:03:19 +0000 |
commit | 6fae566aaa725f3a58413ff7adbcb55a04ac571b (patch) | |
tree | f14025c85dd52a4a21ce49941b23994873df6e3d /src/libstate/pk_engine.cpp | |
parent | 81ff0b8715fabb3014bab4216192330f1c85fffe (diff) |
Library_State had two functions that did the same thing,
algo_factory and algorithm_factory. This is confusing
so for consistency/simplicity, remove algo_factory, making
algorithm_factory the function to call.
In 1.7.14, several functions in lookup.h, including
retrieve_block_cipher, retrieve_hash, etc were changed to accept
a Library_State& reference. However it turns out with the
modified design I've settled upon for 1.8 that it is not
necessary to change those interfaces; instead they always refer
to the global_state algorithm factory which is exactly the
semantics one would expect/desire 99% of the time (and is source
compatible with code written for 1.6, also a plus)
Diffstat (limited to 'src/libstate/pk_engine.cpp')
-rw-r--r-- | src/libstate/pk_engine.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstate/pk_engine.cpp b/src/libstate/pk_engine.cpp index 7b8e7d8fc..5904ce1f9 100644 --- a/src/libstate/pk_engine.cpp +++ b/src/libstate/pk_engine.cpp @@ -19,7 +19,7 @@ IF_Operation* if_op(const BigInt& e, const BigInt& n, const BigInt& d, const BigInt& p, const BigInt& q, const BigInt& d1, const BigInt& d2, const BigInt& c) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -38,7 +38,7 @@ IF_Operation* if_op(const BigInt& e, const BigInt& n, const BigInt& d, *************************************************/ DSA_Operation* dsa_op(const DL_Group& group, const BigInt& y, const BigInt& x) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -57,7 +57,7 @@ DSA_Operation* dsa_op(const DL_Group& group, const BigInt& y, const BigInt& x) *************************************************/ NR_Operation* nr_op(const DL_Group& group, const BigInt& y, const BigInt& x) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -76,7 +76,7 @@ NR_Operation* nr_op(const DL_Group& group, const BigInt& y, const BigInt& x) *************************************************/ ELG_Operation* elg_op(const DL_Group& group, const BigInt& y, const BigInt& x) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -95,7 +95,7 @@ ELG_Operation* elg_op(const DL_Group& group, const BigInt& y, const BigInt& x) *************************************************/ DH_Operation* dh_op(const DL_Group& group, const BigInt& x) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -116,7 +116,7 @@ ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -137,7 +137,7 @@ ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { @@ -155,7 +155,7 @@ ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, *************************************************/ Modular_Exponentiator* mod_exp(const BigInt& n, Power_Mod::Usage_Hints hints) { - Algorithm_Factory::Engine_Iterator i(global_state().algo_factory()); + Algorithm_Factory::Engine_Iterator i(global_state().algorithm_factory()); while(const Engine* engine = i.next()) { |