blob: c50186e35443176d6f7a2b87a5a0b2f9781e5b0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*
* Algorithm Lookup
* (C) 1999-2007,2015 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#ifndef BOTAN_LOOKUP_H__
#define BOTAN_LOOKUP_H__
#include <botan/symkey.h>
#include <string>
namespace Botan {
class BlockCipher;
class StreamCipher;
class HashFunction;
class MessageAuthenticationCode;
class PBKDF;
/*
* Get an algorithm object
* NOTE: these functions create and return new objects, letting the
* caller assume ownership of them
*/
/**
* Block cipher factory method.
*
* @param algo_spec the name of the desired block cipher
* @return pointer to the block cipher object
*/
BOTAN_DLL BlockCipher* get_block_cipher(const std::string& algo_spec, const std::string& provider = "");
BOTAN_DLL std::vector<std::string> get_block_cipher_providers(const std::string& algo_spec);
/**
* Stream cipher factory method.
*
* @param algo_spec the name of the desired stream cipher
* @return pointer to the stream cipher object
*/
BOTAN_DLL StreamCipher* get_stream_cipher(const std::string& algo_spec, const std::string& provider = "");
BOTAN_DLL std::vector<std::string> get_stream_cipher_providers(const std::string& algo_spec);
/**
* Hash function factory method.
*
* @param algo_spec the name of the desired hash function
* @return pointer to the hash function object
*/
BOTAN_DLL HashFunction* get_hash_function(const std::string& algo_spec, const std::string& provider = "");
inline HashFunction* get_hash(const std::string& algo_spec, const std::string& provider = "")
{
return get_hash_function(algo_spec, provider);
}
BOTAN_DLL std::vector<std::string> get_hash_function_providers(const std::string& algo_spec);
/**
* MAC factory method.
*
* @param algo_spec the name of the desired MAC
* @return pointer to the MAC object
*/
BOTAN_DLL MessageAuthenticationCode* get_mac(const std::string& algo_spec, const std::string& provider = "");
BOTAN_DLL std::vector<std::string> get_mac_providers(const std::string& algo_spec);
/**
* Password based key derivation function factory method
* @param algo_spec the name of the desired PBKDF algorithm
* @return pointer to newly allocated object of that type
*/
BOTAN_DLL PBKDF* get_pbkdf(const std::string& algo_spec, const std::string& provider = "");
}
#endif
|