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
16namespace 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*/
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*/
30BOTAN_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*/
40BOTAN_DLL std::map<std::string, bool>
41algorithm_kat(const SCAN_Name& algo_name,
42 const std::map<std::string, std::string>& vars,
44
45}
46
47#endif
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
bool passes_self_tests(Algorithm_Factory &af)
Definition selftest.cpp:209
void confirm_startup_self_tests(Algorithm_Factory &af)
Definition selftest.cpp:226