summaryrefslogtreecommitdiff
path: root/modes.h
diff options
context:
space:
mode:
Diffstat (limited to 'modes.h')
-rw-r--r--modes.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/modes.h b/modes.h
index a4f5bbe..442c320 100644
--- a/modes.h
+++ b/modes.h
@@ -40,7 +40,6 @@ public:
unsigned int OptimalDataAlignment() const {return BlockSize();}
unsigned int IVSize() const {return BlockSize();}
- void GetNextIV(byte *IV);
virtual IV_Requirement IVRequirement() const =0;
protected:
@@ -64,7 +63,6 @@ class CRYPTOPP_NO_VTABLE ModePolicyCommonTemplate : public CipherModeBase, publi
{
unsigned int GetAlignment() const {return m_cipher->BlockAlignment();}
void CipherSetKey(const NameValuePairs &params, const byte *key, size_t length);
- void CipherGetNextIV(byte *IV) {CipherModeBase::GetNextIV(IV);}
};
template <class POLICY_INTERFACE>
@@ -137,7 +135,6 @@ private:
assert(iterationCount == 1);
assert(m_cipher->IsForwardTransformation()); // OFB mode needs the "encrypt" direction of the underlying block cipher, even to decrypt
m_cipher->ProcessBlock(keystreamBuffer);
- memcpy_s(m_register, m_register.size(), keystreamBuffer, BlockSize());
}
void CipherResynchronize(byte *keystreamBuffer, const byte *iv)
{
@@ -150,10 +147,10 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CTR_ModePolicy : public ModePolicyCommonTe
public:
bool IsRandomAccess() const {return true;}
IV_Requirement IVRequirement() const {return UNIQUE_IV;}
- void CipherGetNextIV(byte *IV);
static const char * CRYPTOPP_API StaticAlgorithmName() {return "CTR";}
private:
+ unsigned int GetAlignment() const {return m_cipher->BlockAlignment();}
unsigned int GetBytesPerIteration() const {return BlockSize();}
unsigned int GetIterationsToBuffer() const {return m_cipher->OptimalNumberOfParallelBlocks();}
void WriteKeystream(byte *buffer, size_t iterationCount)