summaryrefslogtreecommitdiff
path: root/filters.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-05 08:53:50 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-05 08:53:50 +0000
commit77d342339b3149f02aaa3521a27b6216468d43dc (patch)
tree548b001016c5f93e2811ac4067c9b18ca36354e4 /filters.cpp
parent15b0c807eb736f7f3800a514fc9a099466654ab9 (diff)
downloadcryptopp-77d342339b3149f02aaa3521a27b6216468d43dc.tar.gz
fix bug when AuthenticatedDecryptionFilter::MAC_AT_BEGIN is not specified
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@439 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'filters.cpp')
-rw-r--r--filters.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/filters.cpp b/filters.cpp
index 86bd616..9a749f4 100644
--- a/filters.cpp
+++ b/filters.cpp
@@ -885,7 +885,11 @@ byte * AuthenticatedDecryptionFilter::ChannelCreatePutSpace(const std::string &c
size_t AuthenticatedDecryptionFilter::ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking)
{
if (channel.empty())
+ {
+ if (m_lastSize > 0)
+ m_hashVerifier.ForceNextPut();
return FilterWithBufferedInput::Put2(begin, length, messageEnd, blocking);
+ }
if (channel == "AAD")
return m_hashVerifier.Put2(begin, length, 0, blocking);