summaryrefslogtreecommitdiff
path: root/filters.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-07-30 17:15:01 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-07-30 17:15:01 +0000
commit7d853c5eae67c4339ade52fc1bbd46513f1724b8 (patch)
treeb2ed0b84682ae41c47d38ed59b8b7efbc8905c19 /filters.h
parent6517f9f14413828a88d939c789bb0335b44a9848 (diff)
downloadcryptopp-7d853c5eae67c4339ade52fc1bbd46513f1724b8.tar.gz
change DLL integrity self-test to allow DLL to be Authenticode signed
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@233 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'filters.h')
-rw-r--r--filters.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/filters.h b/filters.h
index 0b4fa74..2737dc0 100644
--- a/filters.h
+++ b/filters.h
@@ -7,6 +7,7 @@
#include "smartptr.h"
#include "queue.h"
#include "algparam.h"
+#include <deque>
NAMESPACE_BEGIN(CryptoPP)
@@ -86,7 +87,9 @@ public:
: m_transparent(transparent) {Detach(attachment); ResetMeter();}
void SetTransparent(bool transparent) {m_transparent = transparent;}
- void ResetMeter() {m_currentMessageBytes = m_totalBytes = m_currentSeriesMessages = m_totalMessages = m_totalMessageSeries = 0;}
+ void AddRangeToSkip(unsigned int message, lword position, lword size, bool sortNow = true);
+ void ResetMeter();
+ void IsolatedInitialize(const NameValuePairs &parameters) {ResetMeter();}
lword GetCurrentMessageBytes() const {return m_currentMessageBytes;}
lword GetTotalBytes() {return m_totalBytes;}
@@ -101,12 +104,20 @@ public:
bool IsolatedMessageSeriesEnd(bool blocking);
private:
+ size_t PutMaybeModifiable(byte *inString, size_t length, int messageEnd, bool blocking, bool modifiable);
bool ShouldPropagateMessageEnd() const {return m_transparent;}
bool ShouldPropagateMessageSeriesEnd() const {return m_transparent;}
+ struct MessageRange {unsigned int message; lword position; lword size;};
+ friend inline bool operator<(const MessageRange &a, const MessageRange &b)
+ {return a.message < b.message || (a.message == b.message && a.position < b.position);}
+
bool m_transparent;
lword m_currentMessageBytes, m_totalBytes;
unsigned int m_currentSeriesMessages, m_totalMessages, m_totalMessageSeries;
+ std::deque<MessageRange> m_rangesToSkip;
+ byte *m_begin;
+ size_t m_length;
};
//! _