Botan 1.10.17

selftest.h
Go to the documentation of this file.
1 /*
2 * Startup Self Test
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_SELF_TESTS_H__
9 #define BOTAN_SELF_TESTS_H__
10
11 #include <botan/algo_factory.h>
12 #include <botan/scan_name.h>
13 #include <map>
14 #include <string>
15
16 namespace Botan {
17
18 /**
19 * Run a set of self tests on some basic algorithms like AES and SHA-1
20 * @param af an algorithm factory
21 * @throws Self_Test_Error if a failure occured
22 */
23 BOTAN_DLL void confirm_startup_self_tests(Algorithm_Factory& af);
24
25 /**
26 * Run a set of self tests on some basic algorithms like AES and SHA-1
27 * @param af an algorithm factory
28 * @returns false if a failure occured, otherwise true
29 */
30 BOTAN_DLL bool passes_self_tests(Algorithm_Factory& af);
31
32 /**
33 * Run a set of algorithm KATs (known answer tests)
34 * @param algo_name the algorithm we are testing
35 * @param vars a set of input variables for this test, all
36 hex encoded. Keys used: "input", "output", "key", and "iv"
37 * @param af an algorithm factory
38 * @returns map from provider name to test result for that provider
39 */
40 BOTAN_DLL std::map<std::string, bool>
41 algorithm_kat(const SCAN_Name& algo_name,
42 const std::map<std::string, std::string>& vars,
43 Algorithm_Factory& af);
44
45 }
46
47 #endif
Botan::confirm_startup_self_tests
void confirm_startup_self_tests(Algorithm_Factory &af)
Definition: selftest.cpp:226
Botan::algorithm_kat
std::map< std::string, bool > algorithm_kat(const SCAN_Name &algo_name, const std::map< std::string, std::string > &vars, Algorithm_Factory &af)
Definition: selftest.cpp:38
Botan
Definition: algo_base.h:14
Botan::passes_self_tests
bool passes_self_tests(Algorithm_Factory &af)
Definition: selftest.cpp:209