diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-05-04 15:38:32 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-05-04 15:38:32 +0000 |
commit | e893a752d7bf74c9692cad5f058a190a6a047210 (patch) | |
tree | ad77c798110d040680e92eb3bf46523222bca155 /strciphr.cpp | |
parent | 0cee348b78bdb6ef7da48ae6682c17dd75dc2fd4 (diff) | |
download | cryptopp-e893a752d7bf74c9692cad5f058a190a6a047210.tar.gz |
add IncorporateEntropy and GenerateIntoBufferedTransformation to RNG interface
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@342 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'strciphr.cpp')
-rw-r--r-- | strciphr.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/strciphr.cpp b/strciphr.cpp index 6294785..45dd4de 100644 --- a/strciphr.cpp +++ b/strciphr.cpp @@ -24,20 +24,6 @@ void AdditiveCipherTemplate<S>::UncheckedSetKey(const byte *key, unsigned int le } template <class S> -byte AdditiveCipherTemplate<S>::GenerateByte() -{ - PolicyInterface &policy = this->AccessPolicy(); - - if (m_leftOver == 0) - { - policy.WriteKeystream(m_buffer, policy.GetIterationsToBuffer()); - m_leftOver = policy.GetBytesPerIteration(); - } - - return *(KeystreamBufferEnd()-m_leftOver--); -} - -template <class S> void AdditiveCipherTemplate<S>::GenerateBlock(byte *outString, size_t length) { if (m_leftOver > 0) @@ -59,9 +45,7 @@ void AdditiveCipherTemplate<S>::GenerateBlock(byte *outString, size_t length) if (length >= bytesPerIteration) { size_t iterations = length / bytesPerIteration; - policy.WriteKeystream(outString, iterations); - outString += iterations * bytesPerIteration; length -= iterations * bytesPerIteration; |