Botan  1.10.9
core_engine.h
Go to the documentation of this file.
1 /*
2 * Core Engine
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_CORE_ENGINE_H__
9 #define BOTAN_CORE_ENGINE_H__
10 
11 #include <botan/engine.h>
12 
13 namespace Botan {
14 
15 /**
16 * Core Engine
17 */
18 class Core_Engine : public Engine
19  {
20  public:
21  std::string provider_name() const { return "core"; }
22 
24  get_key_agreement_op(const Private_Key& key) const;
25 
27  get_signature_op(const Private_Key& key) const;
28 
30 
32 
34 
37 
38  Keyed_Filter* get_cipher(const std::string&, Cipher_Dir,
40 
42  Algorithm_Factory&) const;
43 
45  Algorithm_Factory&) const;
46 
47  HashFunction* find_hash(const SCAN_Name& request,
48  Algorithm_Factory&) const;
49 
51  Algorithm_Factory&) const;
52 
53  PBKDF* find_pbkdf(const SCAN_Name& algo_spec,
54  Algorithm_Factory& af) const;
55  };
56 
57 /**
58 * Create a cipher mode filter object
59 * @param block_cipher a block cipher object
60 * @param direction are we encrypting or decrypting?
61 * @param mode the name of the cipher mode to use
62 * @param padding the mode padding to use (only used for ECB, CBC)
63 */
64 Keyed_Filter* get_cipher_mode(const BlockCipher* block_cipher,
65  Cipher_Dir direction,
66  const std::string& mode,
67  const std::string& padding);
68 
69 }
70 
71 #endif
Keyed_Filter * get_cipher(const std::string &, Cipher_Dir, Algorithm_Factory &)
Definition: core_modes.cpp:181
StreamCipher * find_stream_cipher(const SCAN_Name &, Algorithm_Factory &) const
BigInt n
Definition: numthry.cpp:26
BlockCipher * find_block_cipher(const SCAN_Name &, Algorithm_Factory &) const
HashFunction * find_hash(const SCAN_Name &request, Algorithm_Factory &) const
Definition: lookup_hash.cpp:98
PK_Ops::Decryption * get_decryption_op(const Private_Key &key) const
Definition: def_pk_ops.cpp:65
std::string provider_name() const
Definition: core_engine.h:21
PK_Ops::Encryption * get_encryption_op(const Public_Key &key) const
Definition: def_pk_ops.cpp:49
PK_Ops::Verification * get_verify_op(const Public_Key &key) const
Definition: def_pk_ops.cpp:134
MessageAuthenticationCode * find_mac(const SCAN_Name &request, Algorithm_Factory &) const
Definition: lookup_mac.cpp:38
PK_Ops::Signature * get_signature_op(const Private_Key &key) const
Definition: def_pk_ops.cpp:97
PBKDF * find_pbkdf(const SCAN_Name &algo_spec, Algorithm_Factory &af) const
Modular_Exponentiator * mod_exp(const BigInt &n, Power_Mod::Usage_Hints) const
Definition: def_powm.cpp:17
Cipher_Dir
Definition: sym_algo.h:87
PK_Ops::Key_Agreement * get_key_agreement_op(const Private_Key &key) const
Definition: def_pk_ops.cpp:81
Keyed_Filter * get_cipher_mode(const BlockCipher *block_cipher, Cipher_Dir direction, const std::string &mode, const std::string &padding)
Definition: core_modes.cpp:77