diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2008-02-02 08:40:27 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2008-02-02 08:40:27 +0000 |
commit | fed5890194f50d587a9dc57f20d89e3369af125a (patch) | |
tree | 847503be51751e8e42fa6e5ed20c34d79dd76f4c /strciphr.h | |
parent | b261da65cbee4c18036f0f98748b924b10500f6b (diff) | |
download | cryptopp-fed5890194f50d587a9dc57f20d89e3369af125a.tar.gz |
fix infinite recursive call in IsRandomAccess (reported by ASBai)
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@421 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'strciphr.h')
-rw-r--r-- | strciphr.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -75,8 +75,8 @@ struct CRYPTOPP_DLL CRYPTOPP_NO_VTABLE AdditiveCipherAbstractPolicy virtual void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount) {assert(false);} virtual void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length) =0; virtual void CipherResynchronize(byte *keystreamBuffer, const byte *iv) {throw NotImplemented("SimpleKeyingInterface: this object doesn't support resynchronization");} - virtual bool IsRandomAccess() const =0; - virtual void SeekToIteration(lword iterationCount) {assert(!IsRandomAccess()); throw NotImplemented("StreamTransformation: this object doesn't support random access");} + virtual bool CipherIsRandomAccess() const =0; + virtual void SeekToIteration(lword iterationCount) {assert(!CipherIsRandomAccess()); throw NotImplemented("StreamTransformation: this object doesn't support random access");} }; template <typename WT, unsigned int W, unsigned int X = 1, class BASE = AdditiveCipherAbstractPolicy> @@ -141,7 +141,7 @@ public: unsigned int OptimalDataAlignment() const {return this->GetPolicy().GetAlignment();} bool IsSelfInverting() const {return true;} bool IsForwardTransformation() const {return true;} - bool IsRandomAccess() const {return this->GetPolicy().IsRandomAccess();} + bool IsRandomAccess() const {return this->GetPolicy().CipherIsRandomAccess();} void Seek(lword position); typedef typename BASE::PolicyInterface PolicyInterface; |