Mercurial > hg > orthanc-object-storage
changeset 25:b0b7eb7cff73
fix encryption
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Sep 2020 14:26:50 +0200 |
parents | 84c4ca822a13 |
children | 471eaf5c5d39 |
files | Common/EncryptionHelpers.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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<AES>::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<AES>::Decryption d; - d.SetKeyWithIV(dataKey, sizeof(dataKey), iv, sizeof(iv)); + d.SetKeyWithIV(dataKey, dataKey.size(), iv, iv.size()); try { AuthenticatedDecryptionFilter df(d, NULL,