From 48c0f900c7ae705f119781ee8bf129cfd5703712 Mon Sep 17 00:00:00 2001 From: Mouse Date: Wed, 6 Jul 2016 11:51:46 -0400 Subject: [PATCH] Corrected for better BC compatibility --- gfpcrypt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gfpcrypt.h b/gfpcrypt.h index 114fe8da..bf103039 100644 --- a/gfpcrypt.h +++ b/gfpcrypt.h @@ -532,8 +532,8 @@ public: mac.Update(encodingParameters.begin(), encodingParameters.size()); if (DHAES_MODE) { - byte L[8] = {0,0,0,0}; - PutWord(false, BIG_ENDIAN_ORDER, L+4, word32(encodingParameters.size())); + byte L[8] = {0,0,0,0, 0,0,0,0}; + PutWord(false, BIG_ENDIAN_ORDER, L, word64(encodingParameters.size())); mac.Update(L, 8); } mac.Final(ciphertext + plaintextLength); @@ -561,8 +561,8 @@ public: mac.Update(encodingParameters.begin(), encodingParameters.size()); if (DHAES_MODE) { - byte L[8] = {0,0,0,0}; - PutWord(false, BIG_ENDIAN_ORDER, L+4, word32(encodingParameters.size())); + byte L[8] = {0,0,0,0, 0,0,0,0}; + PutWord(false, BIG_ENDIAN_ORDER, L, word64(encodingParameters.size())); mac.Update(L, 8); } if (!mac.Verify(ciphertext + plaintextLength))