Cleared "declaration hides other declaration" under VS2015

pull/131/merge
Jeffrey Walton 2016-09-06 22:57:46 -04:00
parent ef5b0ff129
commit 622e958098
1 changed files with 30 additions and 30 deletions

View File

@ -2153,33 +2153,33 @@ bool ValidateBlowfish()
cout << "\nBlowfish validation suite running...\n\n"; cout << "\nBlowfish validation suite running...\n\n";
bool pass1 = true, pass2 = true, pass3 = true, fail; bool pass1 = true, pass2 = true, pass3 = true, fail;
BlowfishEncryption enc; // 32 to 448-bits (4 to 56-bytes) BlowfishEncryption enc1; // 32 to 448-bits (4 to 56-bytes)
pass1 = enc.StaticGetValidKeyLength(3) == 4 && pass1; pass1 = enc1.StaticGetValidKeyLength(3) == 4 && pass1;
pass1 = enc.StaticGetValidKeyLength(4) == 4 && pass1; pass1 = enc1.StaticGetValidKeyLength(4) == 4 && pass1;
pass1 = enc.StaticGetValidKeyLength(5) == 5 && pass1; pass1 = enc1.StaticGetValidKeyLength(5) == 5 && pass1;
pass1 = enc.StaticGetValidKeyLength(8) == 8 && pass1; pass1 = enc1.StaticGetValidKeyLength(8) == 8 && pass1;
pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1; pass1 = enc1.StaticGetValidKeyLength(16) == 16 && pass1;
pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1; pass1 = enc1.StaticGetValidKeyLength(24) == 24 && pass1;
pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1; pass1 = enc1.StaticGetValidKeyLength(32) == 32 && pass1;
pass1 = enc.StaticGetValidKeyLength(56) == 56 && pass1; pass1 = enc1.StaticGetValidKeyLength(56) == 56 && pass1;
pass1 = enc.StaticGetValidKeyLength(57) == 56 && pass1; pass1 = enc1.StaticGetValidKeyLength(57) == 56 && pass1;
pass1 = enc.StaticGetValidKeyLength(60) == 56 && pass1; pass1 = enc1.StaticGetValidKeyLength(60) == 56 && pass1;
pass1 = enc.StaticGetValidKeyLength(64) == 56 && pass1; pass1 = enc1.StaticGetValidKeyLength(64) == 56 && pass1;
pass1 = enc.StaticGetValidKeyLength(128) == 56 && pass1; pass1 = enc1.StaticGetValidKeyLength(128) == 56 && pass1;
BlowfishDecryption dec; // 32 to 448-bits (4 to 56-bytes) BlowfishDecryption dec1; // 32 to 448-bits (4 to 56-bytes)
pass2 = dec.StaticGetValidKeyLength(3) == 4 && pass2; pass2 = dec1.StaticGetValidKeyLength(3) == 4 && pass2;
pass2 = dec.StaticGetValidKeyLength(4) == 4 && pass2; pass2 = dec1.StaticGetValidKeyLength(4) == 4 && pass2;
pass2 = dec.StaticGetValidKeyLength(5) == 5 && pass2; pass2 = dec1.StaticGetValidKeyLength(5) == 5 && pass2;
pass2 = dec.StaticGetValidKeyLength(8) == 8 && pass2; pass2 = dec1.StaticGetValidKeyLength(8) == 8 && pass2;
pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2; pass2 = dec1.StaticGetValidKeyLength(16) == 16 && pass2;
pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2; pass2 = dec1.StaticGetValidKeyLength(24) == 24 && pass2;
pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2; pass2 = dec1.StaticGetValidKeyLength(32) == 32 && pass2;
pass2 = dec.StaticGetValidKeyLength(56) == 56 && pass2; pass2 = dec1.StaticGetValidKeyLength(56) == 56 && pass2;
pass2 = dec.StaticGetValidKeyLength(57) == 56 && pass2; pass2 = dec1.StaticGetValidKeyLength(57) == 56 && pass2;
pass2 = dec.StaticGetValidKeyLength(60) == 56 && pass2; pass2 = dec1.StaticGetValidKeyLength(60) == 56 && pass2;
pass2 = dec.StaticGetValidKeyLength(64) == 56 && pass2; pass2 = dec1.StaticGetValidKeyLength(64) == 56 && pass2;
pass2 = dec.StaticGetValidKeyLength(128) == 56 && pass2; pass2 = dec1.StaticGetValidKeyLength(128) == 56 && pass2;
cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n"; cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
HexEncoder output(new FileSink(cout)); HexEncoder output(new FileSink(cout));
@ -2190,12 +2190,12 @@ bool ValidateBlowfish()
for (int i=0; i<2; i++) for (int i=0; i<2; i++)
{ {
ECB_Mode<Blowfish>::Encryption enc((byte *)key[i], strlen(key[i])); ECB_Mode<Blowfish>::Encryption enc2((byte *)key[i], strlen(key[i]));
enc.ProcessData(out, plain[i], 8); enc2.ProcessData(out, plain[i], 8);
fail = memcmp(out, cipher[i], 8) != 0; fail = memcmp(out, cipher[i], 8) != 0;
ECB_Mode<Blowfish>::Decryption dec((byte *)key[i], strlen(key[i])); ECB_Mode<Blowfish>::Decryption dec2((byte *)key[i], strlen(key[i]));
dec.ProcessData(outplain, cipher[i], 8); dec2.ProcessData(outplain, cipher[i], 8);
fail = fail || memcmp(outplain, plain[i], 8); fail = fail || memcmp(outplain, plain[i], 8);
pass3 = pass3 && !fail; pass3 = pass3 && !fail;