From 622e95809862320b1f71afec2f78d17b27df33f8 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 6 Sep 2016 22:57:46 -0400 Subject: [PATCH] Cleared "declaration hides other declaration" under VS2015 --- validat1.cpp | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/validat1.cpp b/validat1.cpp index 9dd0848f..273bd427 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -2153,33 +2153,33 @@ bool ValidateBlowfish() cout << "\nBlowfish validation suite running...\n\n"; bool pass1 = true, pass2 = true, pass3 = true, fail; - BlowfishEncryption enc; // 32 to 448-bits (4 to 56-bytes) - pass1 = enc.StaticGetValidKeyLength(3) == 4 && pass1; - pass1 = enc.StaticGetValidKeyLength(4) == 4 && pass1; - pass1 = enc.StaticGetValidKeyLength(5) == 5 && pass1; - pass1 = enc.StaticGetValidKeyLength(8) == 8 && pass1; - pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1; - pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1; - pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1; - pass1 = enc.StaticGetValidKeyLength(56) == 56 && pass1; - pass1 = enc.StaticGetValidKeyLength(57) == 56 && pass1; - pass1 = enc.StaticGetValidKeyLength(60) == 56 && pass1; - pass1 = enc.StaticGetValidKeyLength(64) == 56 && pass1; - pass1 = enc.StaticGetValidKeyLength(128) == 56 && pass1; + BlowfishEncryption enc1; // 32 to 448-bits (4 to 56-bytes) + pass1 = enc1.StaticGetValidKeyLength(3) == 4 && pass1; + pass1 = enc1.StaticGetValidKeyLength(4) == 4 && pass1; + pass1 = enc1.StaticGetValidKeyLength(5) == 5 && pass1; + pass1 = enc1.StaticGetValidKeyLength(8) == 8 && pass1; + pass1 = enc1.StaticGetValidKeyLength(16) == 16 && pass1; + pass1 = enc1.StaticGetValidKeyLength(24) == 24 && pass1; + pass1 = enc1.StaticGetValidKeyLength(32) == 32 && pass1; + pass1 = enc1.StaticGetValidKeyLength(56) == 56 && pass1; + pass1 = enc1.StaticGetValidKeyLength(57) == 56 && pass1; + pass1 = enc1.StaticGetValidKeyLength(60) == 56 && pass1; + pass1 = enc1.StaticGetValidKeyLength(64) == 56 && pass1; + pass1 = enc1.StaticGetValidKeyLength(128) == 56 && pass1; - BlowfishDecryption dec; // 32 to 448-bits (4 to 56-bytes) - pass2 = dec.StaticGetValidKeyLength(3) == 4 && pass2; - pass2 = dec.StaticGetValidKeyLength(4) == 4 && pass2; - pass2 = dec.StaticGetValidKeyLength(5) == 5 && pass2; - pass2 = dec.StaticGetValidKeyLength(8) == 8 && pass2; - pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2; - pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2; - pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2; - pass2 = dec.StaticGetValidKeyLength(56) == 56 && pass2; - pass2 = dec.StaticGetValidKeyLength(57) == 56 && pass2; - pass2 = dec.StaticGetValidKeyLength(60) == 56 && pass2; - pass2 = dec.StaticGetValidKeyLength(64) == 56 && pass2; - pass2 = dec.StaticGetValidKeyLength(128) == 56 && pass2; + BlowfishDecryption dec1; // 32 to 448-bits (4 to 56-bytes) + pass2 = dec1.StaticGetValidKeyLength(3) == 4 && pass2; + pass2 = dec1.StaticGetValidKeyLength(4) == 4 && pass2; + pass2 = dec1.StaticGetValidKeyLength(5) == 5 && pass2; + pass2 = dec1.StaticGetValidKeyLength(8) == 8 && pass2; + pass2 = dec1.StaticGetValidKeyLength(16) == 16 && pass2; + pass2 = dec1.StaticGetValidKeyLength(24) == 24 && pass2; + pass2 = dec1.StaticGetValidKeyLength(32) == 32 && pass2; + pass2 = dec1.StaticGetValidKeyLength(56) == 56 && pass2; + pass2 = dec1.StaticGetValidKeyLength(57) == 56 && pass2; + pass2 = dec1.StaticGetValidKeyLength(60) == 56 && pass2; + pass2 = dec1.StaticGetValidKeyLength(64) == 56 && pass2; + pass2 = dec1.StaticGetValidKeyLength(128) == 56 && pass2; cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n"; HexEncoder output(new FileSink(cout)); @@ -2190,12 +2190,12 @@ bool ValidateBlowfish() for (int i=0; i<2; i++) { - ECB_Mode::Encryption enc((byte *)key[i], strlen(key[i])); - enc.ProcessData(out, plain[i], 8); + ECB_Mode::Encryption enc2((byte *)key[i], strlen(key[i])); + enc2.ProcessData(out, plain[i], 8); fail = memcmp(out, cipher[i], 8) != 0; - ECB_Mode::Decryption dec((byte *)key[i], strlen(key[i])); - dec.ProcessData(outplain, cipher[i], 8); + ECB_Mode::Decryption dec2((byte *)key[i], strlen(key[i])); + dec2.ProcessData(outplain, cipher[i], 8); fail = fail || memcmp(outplain, plain[i], 8); pass3 = pass3 && !fail;