Index: modes.h =================================================================== RCS file: /cvsroot/cryptopp/c5/modes.h,v retrieving revision 1.1.1.1 diff -c -r1.1.1.1 modes.h *** modes.h 4 Oct 2002 17:31:52 -0000 1.1.1.1 --- modes.h 5 Aug 2003 19:55:51 -0000 *************** *** 114,119 **** --- 114,120 ---- class OFB_ModePolicy : public ModePolicyCommonTemplate { + public: unsigned int GetBytesPerIteration() const {return BlockSize();} unsigned int GetIterationsToBuffer() const {return 1;} void WriteKeystream(byte *keystreamBuffer, unsigned int iterationCount) *************** *** 131,136 **** --- 132,138 ---- class CTR_ModePolicy : public ModePolicyCommonTemplate { + public: unsigned int GetBytesPerIteration() const {return BlockSize();} unsigned int GetIterationsToBuffer() const {return m_cipher->OptimalNumberOfParallelBlocks();} void WriteKeystream(byte *buffer, unsigned int iterationCount) Index: strciphr.h =================================================================== RCS file: /cvsroot/cryptopp/c5/strciphr.h,v retrieving revision 1.1.1.1 diff -c -r1.1.1.1 strciphr.h *** strciphr.h 4 Oct 2002 17:31:59 -0000 1.1.1.1 --- strciphr.h 5 Aug 2003 19:55:51 -0000 *************** *** 36,44 **** template class AbstractPolicyHolder : public BASE { ! protected: typedef POLICY_INTERFACE PolicyInterface; virtual const POLICY_INTERFACE & GetPolicy() const =0; virtual POLICY_INTERFACE & AccessPolicy() =0; }; --- 36,45 ---- template class AbstractPolicyHolder : public BASE { ! public: typedef POLICY_INTERFACE PolicyInterface; + protected: virtual const POLICY_INTERFACE & GetPolicy() const =0; virtual POLICY_INTERFACE & AccessPolicy() =0; }; *************** *** 119,124 **** --- 120,127 ---- class AdditiveCipherTemplate : public BASE { public: + typedef typename BASE::PolicyInterface PolicyInterface; + byte GenerateByte(); void ProcessData(byte *outString, const byte *inString, unsigned int length); void Resynchronize(const byte *iv); *************** *** 131,138 **** void Seek(dword position); protected: - typedef typename BASE::PolicyInterface PolicyInterface; - void UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length); unsigned int GetBufferByteSize(const PolicyInterface &policy) const {return policy.GetBytesPerIteration() * policy.GetIterationsToBuffer();} --- 134,139 ---- *************** *** 212,217 **** --- 213,220 ---- class CFB_CipherTemplate : public BASE { public: + typedef typename BASE::PolicyInterface PolicyInterface; + void ProcessData(byte *outString, const byte *inString, unsigned int length); void Resynchronize(const byte *iv); unsigned int OptimalBlockSize() const {return GetPolicy().GetBytesPerIteration();} *************** *** 221,228 **** bool IsSelfInverting() const {return false;} protected: - typedef typename BASE::PolicyInterface PolicyInterface; - virtual void CombineMessageAndShiftRegister(byte *output, byte *reg, const byte *message, unsigned int length) =0; void UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length); --- 224,229 ----