summaryrefslogtreecommitdiff
path: root/strciphr.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-05-04 15:38:32 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-05-04 15:38:32 +0000
commite893a752d7bf74c9692cad5f058a190a6a047210 (patch)
treead77c798110d040680e92eb3bf46523222bca155 /strciphr.cpp
parent0cee348b78bdb6ef7da48ae6682c17dd75dc2fd4 (diff)
downloadcryptopp-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.cpp16
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;