Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

datastor.h
Go to the documentation of this file.
1 /*
2 * Data Store
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7
8 #ifndef BOTAN_DATA_STORE_H__
9 #define BOTAN_DATA_STORE_H__
10
11 #include <botan/secmem.h>
12 #include <functional>
13 #include <utility>
14 #include <string>
15 #include <vector>
16 #include <map>
17
18 namespace Botan {
19
20 /**
21 * Data Store
22 *
23 * This class is used internally by the library, and exposed for ABI
24 * reasons. There is no reason for applications to use this type directly.
25 * It will be removed in a future major release.
26 */
27 class BOTAN_DLL Data_Store
28 {
29 public:
30 /**
31 * A search function
32 */
33 bool operator==(const Data_Store&) const;
34
35 std::multimap<std::string, std::string> search_for(
36 std::function<bool (std::string, std::string)> predicate) const;
37
38 std::vector<std::string> get(const std::string&) const;
39
40 std::string get1(const std::string& key) const;
41
42 std::string get1(const std::string& key,
43 const std::string& default_value) const;
44
45 std::vector<uint8_t> get1_memvec(const std::string&) const;
46 uint32_t get1_uint32(const std::string&, uint32_t = 0) const;
47
48 bool has_value(const std::string&) const;
49
50 void add(const std::multimap<std::string, std::string>&);
51 void add(const std::string&, const std::string&);
52 void add(const std::string&, uint32_t);
53 void add(const std::string&, const secure_vector<uint8_t>&);
54 void add(const std::string&, const std::vector<uint8_t>&);
55 private:
56 std::multimap<std::string, std::string> m_contents;
57 };
58
59 }
60
61 #endif
Botan::operator==
bool operator==(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
Definition: alg_id.cpp:67
Botan::secure_vector
std::vector< T, secure_allocator< T >> secure_vector
Definition: secmem.h:121
Botan
Definition: alg_id.cpp:13
Botan::Data_Store
Definition: datastor.h:27