Botan: src/libstate/look_pk.h Source File

Botan 1.10.17

look_pk.h
Go to the documentation of this file.
1 /*
2 * PK Algorithm Lookup
3 * (C) 1999-2010 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_PK_LOOKUP_H__
9 #define BOTAN_PK_LOOKUP_H__
10
11 #include <botan/lookup.h>
12 #include <botan/pubkey.h>
13
14 namespace Botan {
15
16 /**
17 * Public key encryptor factory method.
18 * @deprecated Instantiate object from pubkey.h directly
19 *
20 * @param key the key that will work inside the encryptor
21 * @param eme determines the algorithm and encoding
22 * @return public key encryptor object
23 */
24 BOTAN_DEPRECATED("Instantiate object directly")
25 inline PK_Encryptor* get_pk_encryptor(const Public_Key& key,
26 const std::string& eme)
27 {
28 return new PK_Encryptor_EME(key, eme);
29 }
30
31 /**
32 * Public key decryptor factory method.
33 * @deprecated Instantiate object from pubkey.h directly
34 *
35 * @param key the key that will work inside the decryptor
36 * @param eme determines the algorithm and encoding
37 * @return public key decryptor object
38 */
39 BOTAN_DEPRECATED("Instantiate object directly")
40 inline PK_Decryptor* get_pk_decryptor(const Private_Key& key,
41 const std::string& eme)
42 {
43 return new PK_Decryptor_EME(key, eme);
44 }
45
46 /**
47 * Public key signer factory method.
48 * @deprecated Instantiate object from pubkey.h directly
49 *
50 * @param key the key that will work inside the signer
51 * @param emsa determines the algorithm, encoding and hash algorithm
52 * @param sig_format the signature format to be used
53 * @return public key signer object
54 */
55 BOTAN_DEPRECATED("Instantiate object directly")
56 inline PK_Signer* get_pk_signer(const Private_Key& key,
57 const std::string& emsa,
58 Signature_Format sig_format = IEEE_1363)
59 {
60 return new PK_Signer(key, emsa, sig_format);
61 }
62
63 /**
64 * Public key verifier factory method.
65 * @deprecated Instantiate object from pubkey.h directly
66 *
67 * @param key the key that will work inside the verifier
68 * @param emsa determines the algorithm, encoding and hash algorithm
69 * @param sig_format the signature format to be used
70 * @return public key verifier object
71 */
72 BOTAN_DEPRECATED("Instantiate object directly")
73 inline PK_Verifier* get_pk_verifier(const Public_Key& key,
74 const std::string& emsa,
75 Signature_Format sig_format = IEEE_1363)
76 {
77 return new PK_Verifier(key, emsa, sig_format);
78 }
79
80 /**
81 * Public key key agreement factory method.
82 * @deprecated Instantiate object from pubkey.h directly
83 *
84 * @param key the key that will work inside the key agreement
85 * @param kdf the kdf algorithm to use
86 * @return key agreement algorithm
87 */
88 BOTAN_DEPRECATED("Instantiate object directly")
89 inline PK_Key_Agreement* get_pk_kas(const PK_Key_Agreement_Key& key,
90 const std::string& kdf)
91 {
92 return new PK_Key_Agreement(key, kdf);
93 }
94
95 }
96
97 #endif
Botan::get_pk_encryptor
PK_Encryptor * get_pk_encryptor(const Public_Key &key, const std::string &eme)
Definition: look_pk.h:25
Botan::Private_Key
Definition: pk_keys.h:86
Botan::Signature_Format
Signature_Format
Definition: pubkey.h:24
std
Definition: secmem.h:435
Botan::get_pk_verifier
PK_Verifier * get_pk_verifier(const Public_Key &key, const std::string &emsa, Signature_Format sig_format=IEEE_1363)
Definition: look_pk.h:73
Botan::PK_Decryptor_EME
Definition: pubkey.h:423
Botan
Definition: algo_base.h:14
Botan::PK_Verifier
Definition: pubkey.h:211
Botan::get_pk_decryptor
PK_Decryptor * get_pk_decryptor(const Private_Key &key, const std::string &eme)
Definition: look_pk.h:40
Botan::PK_Encryptor_EME
Definition: pubkey.h:398
Botan::Public_Key
Definition: pk_keys.h:21
Botan::PK_Key_Agreement
Definition: pubkey.h:312
Botan::IEEE_1363
Definition: pubkey.h:24
Botan::get_pk_kas
PK_Key_Agreement * get_pk_kas(const PK_Key_Agreement_Key &key, const std::string &kdf)
Definition: look_pk.h:89
Botan::PK_Key_Agreement_Key
Definition: pk_keys.h:118
Botan::PK_Signer
Definition: pubkey.h:123
Botan::PK_Decryptor
Definition: pubkey.h:85
Botan::PK_Encryptor
Definition: pubkey.h:37
Botan::get_pk_signer
PK_Signer * get_pk_signer(const Private_Key &key, const std::string &emsa, Signature_Format sig_format=IEEE_1363)
Definition: look_pk.h:56