Skip to content

Commit 7b4f062

Browse files
authored
Merge pull request #643 from larssilven/develop2
No memory allocation for each C_DecryptUpdate.
2 parents ebf6ff7 + ffbfd4f commit 7b4f062

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/crypto/SymmetricAlgorithm.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ bool SymmetricAlgorithm::decryptUpdate(const ByteString& encryptedData, ByteStri
121121
}
122122

123123
currentBufferSize += encryptedData.size();
124-
currentAEADBuffer += encryptedData;
124+
if (currentCipherMode == SymMode::GCM) {
125+
currentAEADBuffer += encryptedData;
126+
}
125127

126128
return true;
127129
}

0 commit comments

Comments
 (0)