aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/libstate/engine.cpp15
-rw-r--r--src/core/libstate/lookup.h9
-rw-r--r--src/core/selftest/selftest.cpp4
3 files changed, 11 insertions, 17 deletions
diff --git a/src/core/libstate/engine.cpp b/src/core/libstate/engine.cpp
index 4f58fb040..44c3ae5e5 100644
--- a/src/core/libstate/engine.cpp
+++ b/src/core/libstate/engine.cpp
@@ -383,11 +383,10 @@ void add_algorithm(Library_State& libstate,
/*************************************************
* Get a cipher object *
*************************************************/
-Keyed_Filter* get_cipher(Library_State& libstate,
- const std::string& algo_spec,
+Keyed_Filter* get_cipher(const std::string& algo_spec,
Cipher_Dir direction)
{
- Library_State::Engine_Iterator i(libstate);
+ Library_State::Engine_Iterator i(global_state());
while(Engine* engine = i.next())
{
@@ -402,13 +401,12 @@ Keyed_Filter* get_cipher(Library_State& libstate,
/*************************************************
* Get a cipher object *
*************************************************/
-Keyed_Filter* get_cipher(Library_State& libstate,
- const std::string& algo_spec,
+Keyed_Filter* get_cipher(const std::string& algo_spec,
const SymmetricKey& key,
const InitializationVector& iv,
Cipher_Dir direction)
{
- Keyed_Filter* cipher = get_cipher(libstate, algo_spec, direction);
+ Keyed_Filter* cipher = get_cipher(algo_spec, direction);
cipher->set_key(key);
if(iv.length())
@@ -420,12 +418,11 @@ Keyed_Filter* get_cipher(Library_State& libstate,
/*************************************************
* Get a cipher object *
*************************************************/
-Keyed_Filter* get_cipher(Library_State& libstate,
- const std::string& algo_spec,
+Keyed_Filter* get_cipher(const std::string& algo_spec,
const SymmetricKey& key,
Cipher_Dir direction)
{
- return get_cipher(libstate, algo_spec,
+ return get_cipher(algo_spec,
key, InitializationVector(), direction);
}
diff --git a/src/core/libstate/lookup.h b/src/core/libstate/lookup.h
index 016ad4618..f60104d32 100644
--- a/src/core/libstate/lookup.h
+++ b/src/core/libstate/lookup.h
@@ -58,19 +58,16 @@ BOTAN_DLL KDF* get_kdf(const std::string&);
/*************************************************
* Get a cipher object *
*************************************************/
-BOTAN_DLL Keyed_Filter* get_cipher(Library_State&,
- const std::string&,
+BOTAN_DLL Keyed_Filter* get_cipher(const std::string&,
const SymmetricKey&,
const InitializationVector&,
Cipher_Dir);
-BOTAN_DLL Keyed_Filter* get_cipher(Library_State&,
- const std::string&,
+BOTAN_DLL Keyed_Filter* get_cipher(const std::string&,
const SymmetricKey&,
Cipher_Dir);
-BOTAN_DLL Keyed_Filter* get_cipher(Library_State&,
- const std::string&, Cipher_Dir);
+BOTAN_DLL Keyed_Filter* get_cipher(const std::string&, Cipher_Dir);
/*************************************************
* Check to see if an algorithm exists *
diff --git a/src/core/selftest/selftest.cpp b/src/core/selftest/selftest.cpp
index 0dede1c9d..ad965fb79 100644
--- a/src/core/selftest/selftest.cpp
+++ b/src/core/selftest/selftest.cpp
@@ -35,9 +35,9 @@ void cipher_kat(const std::string& in, const std::string& out,
const std::string& cipher)
{
do_kat(in, out, cipher,
- get_cipher(global_state(), cipher, key, iv, ENCRYPTION));
+ get_cipher(cipher, key, iv, ENCRYPTION));
do_kat(out, in, cipher,
- get_cipher(global_state(), cipher, key, iv, DECRYPTION));
+ get_cipher(cipher, key, iv, DECRYPTION));
}
/*************************************************