diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-18 21:33:18 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-18 21:33:18 +0000 |
commit | 2c43c8505f12d744cd8d93c1ef692962bd8da849 (patch) | |
tree | c178635daa826ac0a4bd557eb59aa4f853dfb957 /filters.cpp | |
parent | a89df27c0f7ded0a673dc84ce0b0e24c6d05e0d0 (diff) | |
download | cryptopp-2c43c8505f12d744cd8d93c1ef692962bd8da849.tar.gz |
allow DLL to be built with VC++ .NET
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@104 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'filters.cpp')
-rw-r--r-- | filters.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/filters.cpp b/filters.cpp index 12c32dd..7928abf 100644 --- a/filters.cpp +++ b/filters.cpp @@ -40,14 +40,12 @@ const BufferedTransformation *Filter::AttachedTransformation() const void Filter::Detach(BufferedTransformation *newOut) { m_attachment.reset(newOut); - NotifyAttachmentChange(); } void Filter::Insert(Filter *filter) { filter->m_attachment.reset(m_attachment.release()); m_attachment.reset(filter); - NotifyAttachmentChange(); } unsigned int Filter::CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end, const std::string &channel, bool blocking) const @@ -896,14 +894,20 @@ unsigned int StringStore::CopyRangeTo2(BufferedTransformation &target, unsigned return blockedBytes; } +void RandomNumberStore::StoreInitialize(const NameValuePairs ¶meters) +{ + parameters.GetRequiredParameter("RandomNumberStore", "RandomNumberGeneratorPointer", m_rng); + parameters.GetRequiredIntParameter("RandomNumberStore", "RandomNumberStoreSize", m_length); +} + unsigned int RandomNumberStore::TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel, bool blocking) { if (!blocking) throw NotImplemented("RandomNumberStore: nonblocking transfer is not implemented by this object"); unsigned long transferMax = transferBytes; - for (transferBytes = 0; transferBytes<transferMax && m_count < m_length; ++transferBytes, ++m_count) - target.ChannelPut(channel, m_rng.GenerateByte()); + for (transferBytes = 0; transferBytes<transferMax && m_count < (unsigned long)m_length; ++transferBytes, ++m_count) + target.ChannelPut(channel, m_rng->GenerateByte()); return 0; } |