summaryrefslogtreecommitdiff
path: root/filters.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-01-20 04:19:35 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-01-20 04:19:35 +0000
commit242d67fb17619670d9b757c442dcf2e26d8478a1 (patch)
tree1f61e8bf59450a028415e5a3f08565a6ceb86afe /filters.h
parent4b85e6cac0d84aaf65d0695adb137ae956e4e241 (diff)
downloadcryptopp-242d67fb17619670d9b757c442dcf2e26d8478a1.tar.gz
changes done for FIPS-140 lab code drop
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@195 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'filters.h')
-rw-r--r--filters.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/filters.h b/filters.h
index 1827c90..ad19b3e 100644
--- a/filters.h
+++ b/filters.h
@@ -214,7 +214,8 @@ private:
class CRYPTOPP_DLL FilterWithInputQueue : public Filter
{
public:
- FilterWithInputQueue(BufferedTransformation *attachment) : Filter(attachment) {}
+ FilterWithInputQueue(BufferedTransformation *attachment=NULL) : Filter(attachment) {}
+
unsigned int Put2(const byte *inString, unsigned int length, int messageEnd, bool blocking)
{
if (!blocking)
@@ -267,8 +268,8 @@ typedef StreamTransformationFilter StreamCipherFilter;
class CRYPTOPP_DLL HashFilter : public Bufferless<Filter>, private FilterPutSpaceHelper
{
public:
- HashFilter(HashTransformation &hm, BufferedTransformation *attachment = NULL, bool putMessage=false)
- : m_hashModule(hm), m_putMessage(putMessage) {Detach(attachment);}
+ HashFilter(HashTransformation &hm, BufferedTransformation *attachment = NULL, bool putMessage=false, int truncatedDigestSize=-1)
+ : m_hashModule(hm), m_putMessage(putMessage), m_truncatedDigestSize(truncatedDigestSize) {Detach(attachment);}
void IsolatedInitialize(const NameValuePairs &parameters);
unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking);
@@ -278,7 +279,9 @@ public:
private:
HashTransformation &m_hashModule;
bool m_putMessage;
+ int m_truncatedDigestSize;
byte *m_space;
+ unsigned int m_digestSize;
};
//! Filter Wrapper for HashTransformation