Botan 1.10.17
Botan::Engine Class Referenceabstract

#include <engine.h>

Inheritance diagram for Botan::Engine:
Botan::AES_ISA_Engine Botan::Assembler_Engine Botan::Core_Engine Botan::Dynamically_Loaded_Engine Botan::GMP_Engine Botan::OpenSSL_Engine Botan::SIMD_Engine

Public Member Functions

virtual BlockCipherfind_block_cipher (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
virtual HashFunctionfind_hash (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
virtual MessageAuthenticationCodefind_mac (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
virtual PBKDFfind_pbkdf (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
virtual StreamCipherfind_stream_cipher (const SCAN_Name &algo_spec, Algorithm_Factory &af) const
virtual Keyed_Filterget_cipher (const std::string &algo_spec, Cipher_Dir dir, Algorithm_Factory &af)
virtual PK_Ops::Decryptionget_decryption_op (const Private_Key &key) const
virtual PK_Ops::Encryptionget_encryption_op (const Public_Key &key) const
virtual PK_Ops::Key_Agreementget_key_agreement_op (const Private_Key &key) const
virtual PK_Ops::Signatureget_signature_op (const Private_Key &key) const
virtual PK_Ops::Verificationget_verify_op (const Public_Key &key) const
virtual Modular_Exponentiatormod_exp (const BigInt &n, Power_Mod::Usage_Hints hints) const
virtual std::string provider_name () const =0
virtual ~Engine ()

Detailed Description

Base class for all engines. All non-pure virtual functions simply return NULL, indicating the algorithm in question is not supported. Subclasses can reimplement whichever function(s) they want to hook in a particular type.

Definition at line 32 of file engine.h.

Constructor & Destructor Documentation

◆ ~Engine()

virtual Botan::Engine::~Engine ( )
inlinevirtual

Definition at line 35 of file engine.h.

35{}

Member Function Documentation

◆ find_block_cipher()

BlockCipher * Botan::Engine::find_block_cipher ( const SCAN_Name & algo_spec,
Algorithm_Factory & af ) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::AES_ISA_Engine, Botan::Assembler_Engine, Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::OpenSSL_Engine, and Botan::SIMD_Engine.

Definition at line 13 of file engine.cpp.

15 {
16 return 0;
17 }

Referenced by provider_name().

◆ find_hash()

HashFunction * Botan::Engine::find_hash ( const SCAN_Name & algo_spec,
Algorithm_Factory & af ) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Assembler_Engine, Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::OpenSSL_Engine, and Botan::SIMD_Engine.

Definition at line 27 of file engine.cpp.

29 {
30 return 0;
31 }

Referenced by provider_name().

◆ find_mac()

MessageAuthenticationCode * Botan::Engine::find_mac ( const SCAN_Name & algo_spec,
Algorithm_Factory & af ) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, and Botan::Dynamically_Loaded_Engine.

Definition at line 34 of file engine.cpp.

36 {
37 return 0;
38 }

Referenced by provider_name().

◆ find_pbkdf()

PBKDF * Botan::Engine::find_pbkdf ( const SCAN_Name & algo_spec,
Algorithm_Factory & af ) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, and Botan::Dynamically_Loaded_Engine.

Definition at line 41 of file engine.cpp.

43 {
44 return 0;
45 }

Referenced by provider_name().

◆ find_stream_cipher()

StreamCipher * Botan::Engine::find_stream_cipher ( const SCAN_Name & algo_spec,
Algorithm_Factory & af ) const
virtual
Parameters
algo_specthe algorithm name/specification
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, and Botan::OpenSSL_Engine.

Definition at line 20 of file engine.cpp.

22 {
23 return 0;
24 }

Referenced by provider_name().

◆ get_cipher()

Keyed_Filter * Botan::Engine::get_cipher ( const std::string & algo_spec,
Cipher_Dir dir,
Algorithm_Factory & af )
virtual

Return a new cipher object

Parameters
algo_specthe algorithm name/specification
dirspecifies if encryption or decryption is desired
afan algorithm factory object
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, and Botan::Dynamically_Loaded_Engine.

Definition at line 54 of file engine.cpp.

57 {
58 return 0;
59 }

Referenced by provider_name().

◆ get_decryption_op()

PK_Ops::Decryption * Botan::Engine::get_decryption_op ( const Private_Key & key) const
virtual

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, and Botan::OpenSSL_Engine.

Definition at line 86 of file engine.cpp.

87 {
88 return 0;
89 }

Referenced by provider_name().

◆ get_encryption_op()

PK_Ops::Encryption * Botan::Engine::get_encryption_op ( const Public_Key & key) const
virtual

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, and Botan::OpenSSL_Engine.

Definition at line 80 of file engine.cpp.

81 {
82 return 0;
83 }

Referenced by provider_name().

◆ get_key_agreement_op()

PK_Ops::Key_Agreement * Botan::Engine::get_key_agreement_op ( const Private_Key & key) const
virtual

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, and Botan::OpenSSL_Engine.

Definition at line 62 of file engine.cpp.

63 {
64 return 0;
65 }

Referenced by provider_name().

◆ get_signature_op()

PK_Ops::Signature * Botan::Engine::get_signature_op ( const Private_Key & key) const
virtual

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, and Botan::OpenSSL_Engine.

Definition at line 68 of file engine.cpp.

69 {
70 return 0;
71 }

Referenced by provider_name().

◆ get_verify_op()

PK_Ops::Verification * Botan::Engine::get_verify_op ( const Public_Key & key) const
virtual

Return a new operator object for this key, if possible

Parameters
keythe key we want an operator for
Returns
newly allocated operator object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, and Botan::OpenSSL_Engine.

Definition at line 74 of file engine.cpp.

75 {
76 return 0;
77 }

Referenced by provider_name().

◆ mod_exp()

Modular_Exponentiator * Botan::Engine::mod_exp ( const BigInt & n,
Power_Mod::Usage_Hints hints ) const
virtual
Parameters
nthe modulus
hintsany use hints
Returns
newly allocated object, or NULL

Reimplemented in Botan::Core_Engine, Botan::Dynamically_Loaded_Engine, Botan::GMP_Engine, and Botan::OpenSSL_Engine.

Definition at line 48 of file engine.cpp.

50 {
51 return 0;
52 }

Referenced by provider_name().

◆ provider_name()


The documentation for this class was generated from the following files: