Crypto++  5.6.4
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 ValidateHMQV();
75 bool ValidateFHMQV();
76 bool ValidateRSA();
77 bool ValidateElGamal();
78 bool ValidateDLIES();
79 bool ValidateNR();
80 bool ValidateDSA(bool thorough);
81 bool ValidateLUC();
82 bool ValidateLUC_DL();
83 bool ValidateLUC_DH();
84 bool ValidateXTR_DH();
85 bool ValidateRabin();
86 bool ValidateRW();
87 //bool ValidateBlumGoldwasser();
88 bool ValidateECP();
89 bool ValidateEC2N();
90 bool ValidateECDSA();
91 bool ValidateESIGN();
92 
93 #if CRYPTOPP_DEBUG
94 bool TestSecBlock();
95 bool TestPolynomialMod2();
96 bool TestHuffmanCodes();
97 #endif
98 
99 // Coverity finding
100 template <class T, bool NON_NEGATIVE>
101 T StringToValue(const std::string& str);
102 
103 // Coverity finding
104 template<>
105 int StringToValue<int, true>(const std::string& str);
106 
107 // Coverity finding
109 {
110 public:
111  StreamState(std::ostream& out)
112  : m_out(out), m_fmt(out.flags()), m_prec(out.precision())
113  {
114  }
115 
116  ~StreamState()
117  {
118  m_out.precision(m_prec);
119  m_out.flags(m_fmt);
120  }
121 
122 private:
123  std::ostream& m_out;
124  std::ios_base::fmtflags m_fmt;
125  std::streamsize m_prec;
126 };
127 
128 // Functions that need a RNG; uses AES inf CFB mode with Seed.
129 CryptoPP::RandomNumberGenerator & GlobalRNG();
130 
131 bool RunTestDataFile(const char *filename, const CryptoPP::NameValuePairs &overrideParameters=CryptoPP::g_nullNameValuePairs, bool thorough=true);
132 
133 #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:76