From 4ff34ee329380ad6e0e20a8a028bdd483815dba2 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 8 Sep 2018 12:10:46 -0400 Subject: [PATCH] Add DefaultDecryptorWithMAC using binary file test Also see https://groups.google.com/d/msg/cryptopp-users/QxPxSHkLM-4/pWmoBRuaBQAJ --- Filelist.txt | 1 + TestData/defdmac.bin | Bin 0 -> 136 bytes validat0.cpp | 53 +++++++++++++++++++++++++++++++------------ 3 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 TestData/defdmac.bin diff --git a/Filelist.txt b/Filelist.txt index 42a56451..af30fe81 100644 --- a/Filelist.txt +++ b/Filelist.txt @@ -388,6 +388,7 @@ TestData/aria.dat TestData/camellia.dat TestData/cast128v.dat TestData/cast256v.dat +TestData/defdmac.bin TestData/descert.dat TestData/dh1024.dat TestData/dh2048.dat diff --git a/TestData/defdmac.bin b/TestData/defdmac.bin new file mode 100644 index 0000000000000000000000000000000000000000..6efc49c7b12d8b11c005a769520526cd04459d5b GIT binary patch literal 136 zcmV;30C)enx`iWWDH^RKFYxr}HW?Td^|ISFBb1(r`^0fN73|Ai0D0R%4{ob<;-QK0 z%s>lNbQX749n@g!rXJUJ_3=1vKWcpNoUa$fgFMBhhIntqYjSnsiLi2o@=F*W3vW*( q+Jbr>X9yD!)}Ts0=yRmT2-!X1W_3@^mXU=&0p01I0Awa?{1)oAazWn! literal 0 HcmV?d00001 diff --git a/validat0.cpp b/validat0.cpp index cb34b7ec..a032c13b 100644 --- a/validat0.cpp +++ b/validat0.cpp @@ -153,13 +153,14 @@ bool TestCompressors() { std::cout << "\nTesting Compressors and Decompressors...\n\n"; bool fail1 = false, fail2 = false, fail3 = false; + const unsigned int COMP_COUNT = 64; try { // Gzip uses Adler32 checksums. We expect a failure to to happen on occasion. // If we see more than 2 failures in a run of 128, then we need to investigate. unsigned int truncatedCount=0; - for (unsigned int i = 0; i<128; ++i) + for (unsigned int i = 0; i