Sync with Upstream master
commit
7b2bfd0eb8
|
|
@ -25,11 +25,11 @@ image:
|
||||||
- Visual Studio 2015
|
- Visual Studio 2015
|
||||||
- Visual Studio 2013
|
- Visual Studio 2013
|
||||||
|
|
||||||
build:
|
build: off
|
||||||
|
|
||||||
project: cryptest.sln
|
# project: cryptest.sln
|
||||||
verbosity: minimal
|
# verbosity: minimal
|
||||||
parallel: true
|
# parallel: true
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
|
|
||||||
|
|
@ -49,8 +49,8 @@ test_script:
|
||||||
# - https://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build
|
# - https://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build
|
||||||
# - https://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor
|
# - https://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor
|
||||||
# Appveyor also complains that it can't find VS2010 tools even though the docs state they are there.
|
# Appveyor also complains that it can't find VS2010 tools even though the docs state they are there.
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
# allow_failures:
|
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
# - platform: x64
|
# - platform: x64
|
||||||
|
|
@ -61,8 +61,9 @@ matrix:
|
||||||
- image: Visual Studio 2017
|
- image: Visual Studio 2017
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
- provider: Email
|
||||||
recipients:
|
to:
|
||||||
- cryptopp-build@googlegroups.com
|
- cryptopp-build@googlegroups.com
|
||||||
on_success: always # default: change
|
on_build_success: true
|
||||||
on_failure: always # default: always
|
on_build_failure: true
|
||||||
|
|
||||||
|
|
|
||||||
22
validat0.cpp
22
validat0.cpp
|
|
@ -198,14 +198,14 @@ bool TestCompressors()
|
||||||
{
|
{
|
||||||
std::string filename = "test.txt";
|
std::string filename = "test.txt";
|
||||||
std::string comment = "This is a test";
|
std::string comment = "This is a test";
|
||||||
word32 filetime = GlobalRNG().GenerateWord32(8, 0xffffff);
|
word32 filetime = GlobalRNG().GenerateWord32(4, 0xffffff);
|
||||||
|
|
||||||
AlgorithmParameters params = MakeParameters(Name::FileTime(), (int)filetime)
|
AlgorithmParameters params = MakeParameters(Name::FileTime(), (int)filetime)
|
||||||
(Name::FileName(), ConstByteArrayParameter(filename.c_str(), false))
|
(Name::FileName(), ConstByteArrayParameter(filename.c_str(), false))
|
||||||
(Name::Comment(), ConstByteArrayParameter(comment.c_str(), false));
|
(Name::Comment(), ConstByteArrayParameter(comment.c_str(), false));
|
||||||
|
|
||||||
std::string src, dest;
|
std::string src, dest;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(8, 0xfff);
|
unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff);
|
||||||
|
|
||||||
src.resize(len);
|
src.resize(len);
|
||||||
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
||||||
|
|
@ -233,7 +233,7 @@ bool TestCompressors()
|
||||||
for (unsigned int i = 0; i<128; i++)
|
for (unsigned int i = 0; i<128; i++)
|
||||||
{
|
{
|
||||||
std::string src, dest;
|
std::string src, dest;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(8, 0xfff);
|
unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff);
|
||||||
|
|
||||||
src.resize(len);
|
src.resize(len);
|
||||||
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
||||||
|
|
@ -248,7 +248,7 @@ bool TestCompressors()
|
||||||
for (unsigned int i = 0; i<128; i++)
|
for (unsigned int i = 0; i<128; i++)
|
||||||
{
|
{
|
||||||
std::string src, dest;
|
std::string src, dest;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(8, 0xfff);
|
unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff);
|
||||||
|
|
||||||
src.resize(len);
|
src.resize(len);
|
||||||
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
||||||
|
|
@ -345,7 +345,7 @@ bool TestCompressors()
|
||||||
for (unsigned int i = 0; i<128; i++)
|
for (unsigned int i = 0; i<128; i++)
|
||||||
{
|
{
|
||||||
std::string src, dest;
|
std::string src, dest;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(8, 0xfff);
|
unsigned int len = GlobalRNG().GenerateWord32(4, 0xfff);
|
||||||
|
|
||||||
src.resize(len);
|
src.resize(len);
|
||||||
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
||||||
|
|
@ -443,7 +443,7 @@ bool TestEncryptors()
|
||||||
for (unsigned int i=0; i<ENCRYPT_COUNT; ++i)
|
for (unsigned int i=0; i<ENCRYPT_COUNT; ++i)
|
||||||
{
|
{
|
||||||
std::string pwd, src, dest, rec;
|
std::string pwd, src, dest, rec;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(16, 0xfff);
|
unsigned int len = GlobalRNG().GenerateWord32(8, 0xfff);
|
||||||
|
|
||||||
src.resize(len);
|
src.resize(len);
|
||||||
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
|
||||||
|
|
@ -574,7 +574,7 @@ bool TestEncryptors()
|
||||||
{
|
{
|
||||||
for (unsigned int i=0; i<ENCRYPT_MAC_COUNT; ++i)
|
for (unsigned int i=0; i<ENCRYPT_MAC_COUNT; ++i)
|
||||||
{
|
{
|
||||||
const unsigned int runt = LegacyEncryptorWithMAC::SALTLENGTH+LegacyEncryptorWithMAC::KEYLENGTH;
|
const unsigned int runt = LegacyDecryptorWithMAC::SALTLENGTH + LegacyDecryptorWithMAC::KEYLENGTH;
|
||||||
std::string pwd, src, dest, rec;
|
std::string pwd, src, dest, rec;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(runt, 0xfff);
|
unsigned int len = GlobalRNG().GenerateWord32(runt, 0xfff);
|
||||||
|
|
||||||
|
|
@ -651,7 +651,7 @@ bool TestSharing()
|
||||||
for (unsigned int shares=3; shares<INFORMATION_SHARES; ++shares)
|
for (unsigned int shares=3; shares<INFORMATION_SHARES; ++shares)
|
||||||
{
|
{
|
||||||
std::string message;
|
std::string message;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(8, 0xff);
|
unsigned int len = GlobalRNG().GenerateWord32(4, 0xff);
|
||||||
unsigned int threshold = GlobalRNG().GenerateWord32(2, shares-1);
|
unsigned int threshold = GlobalRNG().GenerateWord32(2, shares-1);
|
||||||
|
|
||||||
message.resize(len);
|
message.resize(len);
|
||||||
|
|
@ -722,7 +722,7 @@ bool TestSharing()
|
||||||
{
|
{
|
||||||
|
|
||||||
std::string message;
|
std::string message;
|
||||||
unsigned int len = GlobalRNG().GenerateWord32(8, 0xff);
|
unsigned int len = GlobalRNG().GenerateWord32(4, 0xff);
|
||||||
unsigned int threshold = GlobalRNG().GenerateWord32(2, shares-1);
|
unsigned int threshold = GlobalRNG().GenerateWord32(2, shares-1);
|
||||||
|
|
||||||
message.resize(len);
|
message.resize(len);
|
||||||
|
|
@ -2491,9 +2491,9 @@ bool TestHuffmanCodes()
|
||||||
byte data1[0xfff]; // Place on stack, avoid new
|
byte data1[0xfff]; // Place on stack, avoid new
|
||||||
unsigned int data2[0xff];
|
unsigned int data2[0xff];
|
||||||
|
|
||||||
unsigned int len1 = GlobalRNG().GenerateWord32(8, 0xfff);
|
unsigned int len1 = GlobalRNG().GenerateWord32(4, 0xfff);
|
||||||
GlobalRNG().GenerateBlock(data1, len1);
|
GlobalRNG().GenerateBlock(data1, len1);
|
||||||
unsigned int len2 = GlobalRNG().GenerateWord32(8, 0xff);
|
unsigned int len2 = GlobalRNG().GenerateWord32(4, 0xff);
|
||||||
GlobalRNG().GenerateBlock((byte*)data2, len2*sizeof(unsigned int));
|
GlobalRNG().GenerateBlock((byte*)data2, len2*sizeof(unsigned int));
|
||||||
|
|
||||||
ArraySource source(data1, len1, false);
|
ArraySource source(data1, len1, false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue