monotone

monotone Mtn Source Tree

Root/botan/init.h

1/*************************************************
2* Library Initialization Header File *
3* (C) 1999-2007 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 InitializerOptions(const std::string&);
28 private:
29 std::map<std::string, std::string> args;
30 };
31
32/*************************************************
33* Library Initialization/Shutdown Object *
34*************************************************/
35class LibraryInitializer
36 {
37 public:
38 static void initialize(const std::string& = "");
39 static void initialize(const InitializerOptions&);
40 static void initialize(const InitializerOptions&, class Modules&);
41 static void deinitialize();
42
43 LibraryInitializer(const std::string& args = "") { initialize(args); }
44 LibraryInitializer(const InitializerOptions& args) { initialize(args); }
45 ~LibraryInitializer() { deinitialize(); }
46 };
47
48}
49
50#endif

Archive Download this file

Branches

Tags

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