monotone

monotone Mtn Source Tree

Root/botan/init.h

1/*************************************************
2* Library Initialization Header File *
3* (C) 1999-2006 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_INIT_H__
7#define BOTAN_INIT_H__
8
9#include <string>
10#include <map>
11
12namespace Botan {
13
14/*************************************************
15* Options for initializing the library *
16*************************************************/
17class InitializerOptions
18 {
19 public:
20 bool thread_safe() const;
21 bool use_engines() const;
22 bool seed_rng() const;
23 bool secure_memory() const;
24 bool fips_mode() const;
25 bool self_test() const;
26
27 std::string config_file() const;
28
29 InitializerOptions(const std::string&);
30 private:
31 std::map<std::string, std::string> args;
32 };
33
34/*************************************************
35* Library Initialization/Shutdown Object *
36*************************************************/
37class LibraryInitializer
38 {
39 public:
40 static void initialize(const std::string& = "");
41 static void initialize(const InitializerOptions&);
42 static void initialize(const InitializerOptions&, class Modules&);
43 static void deinitialize();
44
45 LibraryInitializer(const std::string& args = "") { initialize(args); }
46 LibraryInitializer(const InitializerOptions& args) { initialize(args); }
47 ~LibraryInitializer() { deinitialize(); }
48 };
49
50}
51
52#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status