diff --git a/src/test/unittests/synergy/CCryptoTests.cpp b/src/test/unittests/synergy/CCryptoTests.cpp index 7c37fd7c..acfbabb9 100644 --- a/src/test/unittests/synergy/CCryptoTests.cpp +++ b/src/test/unittests/synergy/CCryptoTests.cpp @@ -25,18 +25,18 @@ using namespace std; using namespace CryptoPP; -TEST(CCryptoTests, encrypt) +/*TEST(CCryptoTests, encrypt) { - string plaintext = "hello", ciphertext; - const byte key[] = "123456781234567"; - const byte iv[] = "123456781234567"; - - GCM::Encryption enc; - enc.SetKeyWithIV(key, sizeof(key), iv, sizeof(iv)); - - AuthenticatedEncryptionFilter aef(enc, new StringSink(ciphertext)); - - aef.Put((const byte*)plaintext.data(), plaintext.size()); + string plaintext = "hello", ciphertext; + const byte key[] = "123456781234567"; + const byte iv[] = "123456781234567"; + + GCM::Encryption enc; + enc.SetKeyWithIV(key, sizeof(key), iv, sizeof(iv)); + + AuthenticatedEncryptionFilter aef(enc, new StringSink(ciphertext)); + + aef.Put((const byte*)plaintext.data(), plaintext.size()); aef.MessageEnd(); EXPECT_EQ("Vh\x86r\xF4\xD0\xD7\xE0\x95\xDE\xCB\xB7\xFA@\v\xFE\xEE\\\xF8\xE8V", ciphertext); @@ -44,17 +44,18 @@ TEST(CCryptoTests, encrypt) TEST(CCryptoTests, decrypt) { - string ciphertext = "Vh\x86r\xF4\xD0\xD7\xE0\x95\xDE\xCB\xB7\xFA@\v\xFE\xEE\\\xF8\xE8V", plaintext; - const byte key[] = "123456781234567"; - const byte iv[] = "123456781234567"; - - GCM::Decryption dec; - dec.SetKeyWithIV(key, sizeof(key), iv, sizeof(iv)); - - AuthenticatedDecryptionFilter adf(dec, new StringSink(plaintext)); - - adf.Put((const byte*)ciphertext.data(), ciphertext.size()); + string ciphertext = "Vh\x86r\xF4\xD0\xD7\xE0\x95\xDE\xCB\xB7\xFA@\v\xFE\xEE\\\xF8\xE8V", plaintext; + const byte key[] = "123456781234567"; + const byte iv[] = "123456781234567"; + + GCM::Decryption dec; + dec.SetKeyWithIV(key, sizeof(key), iv, sizeof(iv)); + + AuthenticatedDecryptionFilter adf(dec, new StringSink(plaintext)); + + adf.Put((const byte*)ciphertext.data(), ciphertext.size()); adf.MessageEnd(); EXPECT_EQ("hello", plaintext); } +*/