diff options
| author | weidai <weidai11@users.noreply.github.com> | 2003-07-18 21:33:18 +0000 |
|---|---|---|
| committer | weidai <weidai11@users.noreply.github.com> | 2003-07-18 21:33:18 +0000 |
| commit | 55a22f2adff65870cdfc273fa344b49243516dfb (patch) | |
| tree | c178635daa826ac0a4bd557eb59aa4f853dfb957 /filters.cpp | |
| parent | 5b2008101cb8123db25bbe99a2e3688fc426edbc (diff) | |
| download | cryptopp-git-55a22f2adff65870cdfc273fa344b49243516dfb.tar.gz | |
allow DLL to be built with VC++ .NET
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 12c32dd6..7928abf4 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; } |
