summaryrefslogtreecommitdiff
path: root/strciphr.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2008-02-02 08:40:27 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2008-02-02 08:40:27 +0000
commitfed5890194f50d587a9dc57f20d89e3369af125a (patch)
tree847503be51751e8e42fa6e5ed20c34d79dd76f4c /strciphr.h
parentb261da65cbee4c18036f0f98748b924b10500f6b (diff)
downloadcryptopp-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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/strciphr.h b/strciphr.h
index 6a5cc97..71a87e9 100644
--- a/strciphr.h
+++ b/strciphr.h
@@ -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 &params, 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;