Crypto++  5.6.3
Free C++ class library of cryptographic schemes
validate.h
1 #ifndef CRYPTOPP_VALIDATE_H
2 #define CRYPTOPP_VALIDATE_H
3 
4 #include "cryptlib.h"
5 #include <iostream>
6 #include <iomanip>
7 
8 bool ValidateAll(bool thorough);
9 bool TestSettings();
10 bool TestOS_RNG();
11 bool TestAutoSeeded();
12 bool TestAutoSeededX917();
13 
14 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
15 bool TestRDRAND();
16 bool TestRDSEED();
17 #endif
18 
19 bool ValidateBaseCode();
20 bool ValidateCRC32();
21 bool ValidateAdler32();
22 bool ValidateMD2();
23 bool ValidateMD4();
24 bool ValidateMD5();
25 bool ValidateSHA();
26 bool ValidateSHA2();
27 bool ValidateTiger();
28 bool ValidateRIPEMD();
29 bool ValidatePanama();
30 bool ValidateWhirlpool();
31 
32 bool ValidateHMAC();
33 bool ValidateTTMAC();
34 
35 bool ValidateCipherModes();
36 bool ValidatePBKDF();
37 bool ValidateHKDF();
38 
39 bool ValidateDES();
40 bool ValidateIDEA();
41 bool ValidateSAFER();
42 bool ValidateRC2();
43 bool ValidateARC4();
44 
45 bool ValidateRC5();
46 bool ValidateBlowfish();
47 bool ValidateThreeWay();
48 bool ValidateGOST();
49 bool ValidateSHARK();
50 bool ValidateSEAL();
51 bool ValidateCAST();
52 bool ValidateSquare();
53 bool ValidateSKIPJACK();
54 bool ValidateRC6();
55 bool ValidateMARS();
56 bool ValidateRijndael();
57 bool ValidateTwofish();
58 bool ValidateSerpent();
59 bool ValidateSHACAL2();
60 bool ValidateCamellia();
61 bool ValidateSalsa();
62 bool ValidateSosemanuk();
63 bool ValidateVMAC();
64 bool ValidateCCM();
65 bool ValidateGCM();
66 bool ValidateCMAC();
67 
68 bool ValidateBBS();
69 bool ValidateDH();
70 bool ValidateMQV();
71 bool ValidateRSA();
72 bool ValidateElGamal();
73 bool ValidateDLIES();
74 bool ValidateNR();
75 bool ValidateDSA(bool thorough);
76 bool ValidateLUC();
77 bool ValidateLUC_DL();
78 bool ValidateLUC_DH();
79 bool ValidateXTR_DH();
80 bool ValidateRabin();
81 bool ValidateRW();
82 //bool ValidateBlumGoldwasser();
83 bool ValidateECP();
84 bool ValidateEC2N();
85 bool ValidateECDSA();
86 bool ValidateESIGN();
87 
88 #if !defined(NDEBUG)
89 bool TestSecBlock();
90 bool TestPolynomialMod2();
91 #endif
92 
93 // Coverity finding
94 template <class T, bool NON_NEGATIVE>
95 T StringToValue(const std::string& str);
96 
97 // Coverity finding
98 template<>
99 int StringToValue<int, true>(const std::string& str);
100 
101 // Coverity finding
103 {
104 public:
105  StreamState(std::ostream& out)
106  : m_out(out), m_fmt(out.flags()), m_prec(out.precision())
107  {
108  }
109 
110  ~StreamState()
111  {
112  m_out.precision(m_prec);
113  m_out.flags(m_fmt);
114  }
115 
116 private:
117  std::ostream& m_out;
118  std::ios_base::fmtflags m_fmt;
119  std::streamsize m_prec;
120 };
121 
122 // Functions that need a RNG; uses AES inf CFB mode with Seed.
123 CryptoPP::RandomNumberGenerator & GlobalRNG();
124 
125 bool RunTestDataFile(const char *filename, const CryptoPP::NameValuePairs &overrideParameters=CryptoPP::g_nullNameValuePairs, bool thorough=true);
126 
127 #endif
Abstract base classes that provide a uniform interface to this library.
const NameValuePairs & g_nullNameValuePairs
An empty set of name-value pairs.
Definition: cryptlib.cpp:79