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 ValidateCRC32C();
22 bool ValidateAdler32();
23 bool ValidateMD2();
24 bool ValidateMD4();
25 bool ValidateMD5();
26 bool ValidateSHA();
27 bool ValidateSHA2();
28 bool ValidateTiger();
29 bool ValidateRIPEMD();
30 bool ValidatePanama();
31 bool ValidateWhirlpool();
32 bool ValidateBLAKE2s();
33 bool ValidateBLAKE2b();
34 
35 bool ValidateHMAC();
36 bool ValidateTTMAC();
37 
38 bool ValidateCipherModes();
39 bool ValidatePBKDF();
40 bool ValidateHKDF();
41 
42 bool ValidateDES();
43 bool ValidateIDEA();
44 bool ValidateSAFER();
45 bool ValidateRC2();
46 bool ValidateARC4();
47 
48 bool ValidateRC5();
49 bool ValidateBlowfish();
50 bool ValidateThreeWay();
51 bool ValidateGOST();
52 bool ValidateSHARK();
53 bool ValidateSEAL();
54 bool ValidateCAST();
55 bool ValidateSquare();
56 bool ValidateSKIPJACK();
57 bool ValidateRC6();
58 bool ValidateMARS();
59 bool ValidateRijndael();
60 bool ValidateTwofish();
61 bool ValidateSerpent();
62 bool ValidateSHACAL2();
63 bool ValidateCamellia();
64 bool ValidateSalsa();
65 bool ValidateSosemanuk();
66 bool ValidateVMAC();
67 bool ValidateCCM();
68 bool ValidateGCM();
69 bool ValidateCMAC();
70 
71 bool ValidateBBS();
72 bool ValidateDH();
73 bool ValidateMQV();
74 bool ValidateRSA();
75 bool ValidateElGamal();
76 bool ValidateDLIES();
77 bool ValidateNR();
78 bool ValidateDSA(bool thorough);
79 bool ValidateLUC();
80 bool ValidateLUC_DL();
81 bool ValidateLUC_DH();
82 bool ValidateXTR_DH();
83 bool ValidateRabin();
84 bool ValidateRW();
85 //bool ValidateBlumGoldwasser();
86 bool ValidateECP();
87 bool ValidateEC2N();
88 bool ValidateECDSA();
89 bool ValidateESIGN();
90 
91 #if !defined(NDEBUG)
92 bool TestSecBlock();
93 bool TestPolynomialMod2();
94 #endif
95 
96 // Coverity finding
97 template <class T, bool NON_NEGATIVE>
98 T StringToValue(const std::string& str);
99 
100 // Coverity finding
101 template<>
102 int StringToValue<int, true>(const std::string& str);
103 
104 // Coverity finding
106 {
107 public:
108  StreamState(std::ostream& out)
109  : m_out(out), m_fmt(out.flags()), m_prec(out.precision())
110  {
111  }
112 
113  ~StreamState()
114  {
115  m_out.precision(m_prec);
116  m_out.flags(m_fmt);
117  }
118 
119 private:
120  std::ostream& m_out;
121  std::ios_base::fmtflags m_fmt;
122  std::streamsize m_prec;
123 };
124 
125 // Functions that need a RNG; uses AES inf CFB mode with Seed.
126 CryptoPP::RandomNumberGenerator & GlobalRNG();
127 
128 bool RunTestDataFile(const char *filename, const CryptoPP::NameValuePairs &overrideParameters=CryptoPP::g_nullNameValuePairs, bool thorough=true);
129 
130 #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