From 9b9b9994c269484b470f02e54d83a07de185b13b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 1 Aug 2017 23:23:51 -0400 Subject: [PATCH] Increase minimum size for DefaultEncryptor test. Decrease minimum size fir Inflator tests --- validat0.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/validat0.cpp b/validat0.cpp index 4b482c03..8c2f7692 100644 --- a/validat0.cpp +++ b/validat0.cpp @@ -163,7 +163,7 @@ bool TestCompressors() for (unsigned int i = 0; i<128; ++i) { std::string src, dest, rec; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); + unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -198,14 +198,14 @@ bool TestCompressors() { std::string filename = "test.txt"; std::string comment = "This is a test"; - word32 filetime = GlobalRNG().GenerateWord32(0, 0xffffff); + word32 filetime = GlobalRNG().GenerateWord32(8, 0xffffff); AlgorithmParameters params = MakeParameters(Name::FileTime(), (int)filetime) (Name::FileName(), ConstByteArrayParameter(filename.c_str(), false)) (Name::Comment(), ConstByteArrayParameter(comment.c_str(), false)); std::string src, dest; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); + unsigned int len = GlobalRNG().GenerateWord32(8, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -288,7 +288,7 @@ bool TestCompressors() for (unsigned int i = 0; i<128; ++i) { std::string src, dest, rec; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); + unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -369,7 +369,7 @@ bool TestCompressors() for (unsigned int i = 0; i<128; ++i) { std::string src, dest, rec; - unsigned int len = GlobalRNG().GenerateWord32(0, 0xfff); + unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff); src.resize(len); GlobalRNG().GenerateBlock(reinterpret_cast(&src[0]), src.size()); @@ -475,8 +475,9 @@ bool TestEncryptors() { for (unsigned int i=0; i(&src[0]), src.size()); @@ -573,8 +574,9 @@ bool TestEncryptors() { for (unsigned int i=0; i(&src[0]), src.size()); @@ -649,7 +651,7 @@ bool TestSharing() for (unsigned int shares=3; shares