#include <dyn_engine.h>
Dynamically_Loaded_Engine just proxies the requests to the underlying Engine object, and handles load/unload details
Definition at line 19 of file dyn_engine.h.
◆ Dynamically_Loaded_Engine()
| Botan::Dynamically_Loaded_Engine::Dynamically_Loaded_Engine |
( |
const std::string & | lib_path | ) |
|
- Parameters
-
| lib_path | full pathname to DLL to load |
Definition at line 22 of file dyn_engine.cpp.
23 :
24 engine(0)
25 {
27
28 try
29 {
30 module_version_func get_version =
31 lib->resolve<module_version_func>("module_version");
32
33 const u32bit mod_version = get_version();
34
35 if(mod_version != 20101003)
36 throw std::runtime_error("Incompatible version in " +
37 library_path + " of " +
39
40 creator_func creator =
41 lib->resolve<creator_func>("create_engine");
42
43 engine = creator();
44
45 if(!engine)
46 throw std::runtime_error("Creator function in " +
47 library_path + " failed");
48 }
49 catch(...)
50 {
51 delete lib;
52 lib = 0;
53 throw;
54 }
55 }
Dynamically_Loaded_Library(const std::string &lib_name)
std::string to_string(u64bit n, size_t min_len)
References Botan::Dynamically_Loaded_Library::Dynamically_Loaded_Library(), and Botan::to_string().
◆ ~Dynamically_Loaded_Engine()
| Botan::Dynamically_Loaded_Engine::~Dynamically_Loaded_Engine |
( |
| ) |
|
Definition at line 57 of file dyn_engine.cpp.
58 {
59 delete engine;
60 delete lib;
61 }
◆ find_block_cipher()
- Parameters
-
| algo_spec | the algorithm name/specification |
| af | an algorithm factory object |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 31 of file dyn_engine.h.
33 {
34 return engine->find_block_cipher(algo_spec, af);
35 }
◆ find_hash()
- Parameters
-
| algo_spec | the algorithm name/specification |
| af | an algorithm factory object |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 43 of file dyn_engine.h.
45 {
46 return engine->find_hash(algo_spec, af);
47 }
◆ find_mac()
- Parameters
-
| algo_spec | the algorithm name/specification |
| af | an algorithm factory object |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 49 of file dyn_engine.h.
51 {
52 return engine->find_mac(algo_spec, af);
53 }
◆ find_pbkdf()
- Parameters
-
| algo_spec | the algorithm name/specification |
| af | an algorithm factory object |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 55 of file dyn_engine.h.
57 {
58 return engine->find_pbkdf(algo_spec, af);
59 }
◆ find_stream_cipher()
- Parameters
-
| algo_spec | the algorithm name/specification |
| af | an algorithm factory object |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 37 of file dyn_engine.h.
39 {
40 return engine->find_stream_cipher(algo_spec, af);
41 }
◆ get_cipher()
Return a new cipher object
- Parameters
-
| algo_spec | the algorithm name/specification |
| dir | specifies if encryption or decryption is desired |
| af | an algorithm factory object |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 67 of file dyn_engine.h.
70 {
71 return engine->get_cipher(algo_spec, dir, af);
72 }
◆ get_decryption_op()
Return a new operator object for this key, if possible
- Parameters
-
| key | the key we want an operator for |
- Returns
- newly allocated operator object, or NULL
Reimplemented from Botan::Engine.
Definition at line 99 of file dyn_engine.h.
100 {
101 return engine->get_decryption_op(key);
102 }
◆ get_encryption_op()
Return a new operator object for this key, if possible
- Parameters
-
| key | the key we want an operator for |
- Returns
- newly allocated operator object, or NULL
Reimplemented from Botan::Engine.
Definition at line 93 of file dyn_engine.h.
94 {
95 return engine->get_encryption_op(key);
96 }
◆ get_key_agreement_op()
Return a new operator object for this key, if possible
- Parameters
-
| key | the key we want an operator for |
- Returns
- newly allocated operator object, or NULL
Reimplemented from Botan::Engine.
Definition at line 75 of file dyn_engine.h.
76 {
77 return engine->get_key_agreement_op(key);
78 }
◆ get_signature_op()
Return a new operator object for this key, if possible
- Parameters
-
| key | the key we want an operator for |
- Returns
- newly allocated operator object, or NULL
Reimplemented from Botan::Engine.
Definition at line 81 of file dyn_engine.h.
82 {
83 return engine->get_signature_op(key);
84 }
◆ get_verify_op()
Return a new operator object for this key, if possible
- Parameters
-
| key | the key we want an operator for |
- Returns
- newly allocated operator object, or NULL
Reimplemented from Botan::Engine.
Definition at line 87 of file dyn_engine.h.
88 {
89 return engine->get_verify_op(key);
90 }
◆ mod_exp()
- Parameters
-
| n | the modulus |
| hints | any use hints |
- Returns
- newly allocated object, or NULL
Reimplemented from Botan::Engine.
Definition at line 61 of file dyn_engine.h.
63 {
64 return engine->mod_exp(n, hints);
65 }
◆ provider_name()
| std::string Botan::Dynamically_Loaded_Engine::provider_name |
( |
| ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following files: