summaryrefslogtreecommitdiff
path: root/datatest.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-04-26 04:50:48 -0400
committerGitHub <noreply@github.com>2021-04-26 04:50:48 -0400
commita0e21c77aeadb2d8bb4c03a830528c9ae0616dfe (patch)
tree9c8dd638fa7dd6a1c84d483eb062c7716f6a3db5 /datatest.cpp
parent21a40abc5ceeb0ccf6577a444f1b4c19fa6379c6 (diff)
downloadcryptopp-git-a0e21c77aeadb2d8bb4c03a830528c9ae0616dfe.tar.gz
Add LSH dynamic dispatch (PR #1032)
This commit adds dynamic dispatch to LSH. The implementation pivots on AVX2 and SSSE3.
Diffstat (limited to 'datatest.cpp')
-rw-r--r--datatest.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/datatest.cpp b/datatest.cpp
index cea57f79..f3a8766f 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -241,15 +241,15 @@ void PutDecodedDatumInto(const TestData &data, const char *name, BufferedTransfo
}
else if (s1.substr(0, 2) == "0x")
{
- std::string::size_type pos = s1.find(' ');
- StringSource(s1.substr(2, pos), true, new HexDecoder(new StringSink(s2)));
- s1 = s1.substr(STDMIN(pos, s1.length()));
+ std::string::size_type n = s1.find(' ');
+ StringSource(s1.substr(2, n), true, new HexDecoder(new StringSink(s2)));
+ s1 = s1.substr(STDMIN(n, s1.length()));
}
else
{
- std::string::size_type pos = s1.find(' ');
- StringSource(s1.substr(0, pos), true, new HexDecoder(new StringSink(s2)));
- s1 = s1.substr(STDMIN(pos, s1.length()));
+ std::string::size_type n = s1.find(' ');
+ StringSource(s1.substr(0, n), true, new HexDecoder(new StringSink(s2)));
+ s1 = s1.substr(STDMIN(n, s1.length()));
}
while (repeat--)
@@ -850,8 +850,8 @@ void TestSymmetricCipherWithFileSource(TestData &v, const NameValuePairs &overri
if (encrypted != ciphertext)
{
std::cout << "\nincorrectly encrypted: ";
- StringSource ss(encrypted, false, new HexEncoder(new FileSink(std::cout)));
- ss.Pump(2048); ss.Flush(false);
+ StringSource sss(encrypted, false, new HexEncoder(new FileSink(std::cout)));
+ sss.Pump(2048); sss.Flush(false);
std::cout << "\n";
SignalTestFailure();
}
@@ -867,8 +867,8 @@ void TestSymmetricCipherWithFileSource(TestData &v, const NameValuePairs &overri
if (decrypted != plaintext)
{
std::cout << "\nincorrectly decrypted: ";
- StringSource ss(decrypted, false, new HexEncoder(new FileSink(std::cout)));
- ss.Pump(256); ss.Flush(false);
+ StringSource sss(decrypted, false, new HexEncoder(new FileSink(std::cout)));
+ sss.Pump(256); sss.Flush(false);
std::cout << "\n";
SignalTestFailure();
}