summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--datatest.cpp10
-rw-r--r--dlltest.cpp2
-rw-r--r--fipstest.cpp40
-rw-r--r--test.cpp20
4 files changed, 36 insertions, 36 deletions
diff --git a/datatest.cpp b/datatest.cpp
index 97a0fbd6..315b93da 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -24,7 +24,7 @@
#endif
#if defined(__COVERITY__)
-extern "C" void __coverity_tainted_data_sanitize__(void *);
+extern "C" void __coverity_tainted_data_sanitize__(void *);
#endif
USING_NAMESPACE(CryptoPP)
@@ -113,7 +113,7 @@ void PutDecodedDatumInto(const TestData &data, const char *name, BufferedTransfo
repeat = atoi(s1.c_str()+1);
s1 = s1.substr(s1.find(' ')+1);
}
-
+
s2 = ""; // MSVC 6 doesn't have clear();
if (s1[0] == '\"')
@@ -184,9 +184,9 @@ public:
else
return false;
}
-
+
const std::string &value = i->second;
-
+
if (valueType == typeid(int))
*reinterpret_cast<int *>(pValue) = atoi(value.c_str());
else if (valueType == typeid(Integer))
@@ -637,7 +637,7 @@ void TestKeyDerivationFunction(TestData &v)
reinterpret_cast<const byte*>(key.data()), key.size(),
reinterpret_cast<const byte*>(salt.data()), salt.size(),
reinterpret_cast<const byte*>(info.data()), info.size());
-
+
if(calc != derived || ret != length)
SignalTestFailure();
}
diff --git a/dlltest.cpp b/dlltest.cpp
index 342458f0..01906207 100644
--- a/dlltest.cpp
+++ b/dlltest.cpp
@@ -80,7 +80,7 @@ void FIPS140_SampleApplication()
const byte message[] = {'a', 'b', 'c'};
const byte expectedDigest[] = {0xA9,0x99,0x3E,0x36,0x47,0x06,0x81,0x6A,0xBA,0x3E,0x25,0x71,0x78,0x50,0xC2,0x6C,0x9C,0xD0,0xD8,0x9D};
byte digest[20];
-
+
SHA1 sha;
sha.Update(message, 3);
sha.Final(digest);
diff --git a/fipstest.cpp b/fipstest.cpp
index 6edfa5b1..48704e91 100644
--- a/fipstest.cpp
+++ b/fipstest.cpp
@@ -82,8 +82,8 @@ void KnownAnswerTest(RandomNumberGenerator &rng, const char *output)
template <class CIPHER>
void X917RNG_KnownAnswerTest(
- const char *key,
- const char *seed,
+ const char *key,
+ const char *seed,
const char *deterministicTimeVector,
const char *output,
CIPHER *dummy = NULL)
@@ -119,9 +119,9 @@ void KnownAnswerTest(StreamTransformation &encryption, StreamTransformation &dec
template <class CIPHER>
void SymmetricEncryptionKnownAnswerTest(
- const char *key,
- const char *hexIV,
- const char *plaintext,
+ const char *key,
+ const char *hexIV,
+ const char *plaintext,
const char *ecb,
const char *cbc,
const char *cfb,
@@ -210,22 +210,22 @@ void EncryptionPairwiseConsistencyTest(const PK_Encryptor &encryptor, const PK_D
std::string ciphertext, decrypted;
StringSource(
- testMessage,
- true,
+ testMessage,
+ true,
new PK_EncryptorFilter(
- rng,
- encryptor,
+ rng,
+ encryptor,
new StringSink(ciphertext)));
if (ciphertext == testMessage)
throw 0;
StringSource(
- ciphertext,
- true,
+ ciphertext,
+ true,
new PK_DecryptorFilter(
- rng,
- decryptor,
+ rng,
+ decryptor,
new StringSink(decrypted)));
if (decrypted != testMessage)
@@ -244,11 +244,11 @@ void SignaturePairwiseConsistencyTest(const PK_Signer &signer, const PK_Verifier
RandomPool rng;
StringSource(
- "test message",
- true,
+ "test message",
+ true,
new SignerFilter(
- rng,
- signer,
+ rng,
+ signer,
new VerifierFilter(verifier, NULL, VerifierFilter::THROW_EXCEPTION),
true));
}
@@ -530,7 +530,7 @@ void DoPowerUpSelfTest(const char *moduleFilename, const byte *expectedModuleMac
"Sample #2",
"0922d3405faa3d194f82a45830737d5cc6c75d24");
- const char *keyRSA1 =
+ const char *keyRSA1 =
"30820150020100300d06092a864886f70d01010105000482013a3082013602010002400a66791dc6988168de7ab77419bb7fb0"
"c001c62710270075142942e19a8d8c51d053b3e3782a1de5dc5af4ebe99468170114a1dfe67cdc9a9af55d655620bbab0203010001"
"02400123c5b61ba36edb1d3679904199a89ea80c09b9122e1400c09adcf7784676d01d23356a7d44d6bd8bd50e94bfc723fa"
@@ -615,8 +615,8 @@ NAMESPACE_END
#ifdef CRYPTOPP_WIN32_AVAILABLE
// DllMain needs to be in the global namespace
-BOOL APIENTRY DllMain(HANDLE hModule,
- DWORD dwReason,
+BOOL APIENTRY DllMain(HANDLE hModule,
+ DWORD dwReason,
LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH)
diff --git a/test.cpp b/test.cpp
index 509d3848..61965685 100644
--- a/test.cpp
+++ b/test.cpp
@@ -299,7 +299,7 @@ int CRYPTOPP_API main(int argc, char *argv[])
#endif
if (fname.find(".txt") == std::string::npos)
fname = "TestVectors/" + fname + ".txt";
-
+
PrintSeedAndThreads(seed);
return !RunTestDataFile(fname.c_str());
}
@@ -431,7 +431,7 @@ T StringToValue(const std::string& str) {
std::istringstream iss(str);
T value;
iss >> value;
-
+
// Use fail(), not bad()
if (iss.fail())
throw InvalidArgument("cryptest.exe: '" + str +"' is not a value");
@@ -441,7 +441,7 @@ T StringToValue(const std::string& str) {
throw InvalidArgument("cryptest.exe: '" + str +"' is negative");
#endif
- return value;
+ return value;
}
template<>
@@ -449,11 +449,11 @@ int StringToValue<int, true>(const std::string& str)
{
Integer n(str.c_str());
long l = n.ConvertToLong();
-
+
int r;
if(!SafeConvert(l, r))
throw InvalidArgument("cryptest.exe: '" + str +"' is not an integer value");
-
+
return r;
}
@@ -754,8 +754,8 @@ void GzipFile(const char *in, const char *out, int deflate_level)
// \ Gunzip
// \ |
// \ v
- // > ComparisonFilter
-
+ // > ComparisonFilter
+
EqualityComparisonFilter comparison;
Gunzip gunzip(new ChannelSwitch(comparison, "0"));
@@ -815,12 +815,12 @@ void ForwardTcpPort(const char *sourcePortName, const char *destinationHost, con
sockListen.Create();
sockListen.Bind(sourcePort);
-
+
int err = setsockopt(sockListen, IPPROTO_TCP, TCP_NODELAY, "\x01", 1);
assert(err == 0);
if(err != 0)
throw Socket::Err(sockListen, "setsockopt", sockListen.GetLastError());
-
+
cout << "Listing on port " << sourcePort << ".\n";
sockListen.Listen();
@@ -966,7 +966,7 @@ bool Validate(int alg, bool thorough, const char *seedInput)
tm localTime = {};
char timeBuf[64];
errno_t err;
-
+
const time_t endTime = time(NULL);
err = localtime_s(&localTime, &endTime);
assert(err == 0);