# HG changeset patch # User Sebastien Jodogne # Date 1599481610 -7200 # Node ID b0b7eb7cff732d96dc4fadd04bd42103fd6ece41 # Parent 84c4ca822a1390d179896c3772a8b38bfc17d049 fix encryption diff -r 84c4ca822a13 -r b0b7eb7cff73 Common/EncryptionHelpers.cpp --- a/Common/EncryptionHelpers.cpp Mon Sep 07 14:18:57 2020 +0200 +++ b/Common/EncryptionHelpers.cpp Mon Sep 07 14:26:50 2020 +0200 @@ -275,7 +275,7 @@ try { GCM::Encryption e; - e.SetKeyWithIV(dataKey, dataKey.size(), iv, sizeof(iv)); + e.SetKeyWithIV(dataKey, dataKey.size(), iv, iv.size()); // the output text starts with the unencrypted prefix output = prefix; @@ -323,7 +323,7 @@ // std::cout << ToHexString(iv) << std::endl; GCM::Decryption d; - d.SetKeyWithIV(dataKey, sizeof(dataKey), iv, sizeof(iv)); + d.SetKeyWithIV(dataKey, dataKey.size(), iv, iv.size()); try { AuthenticatedDecryptionFilter df(d, NULL,