From 42c3d8f3aa593c224174558fd6f3d2709e08f7d0 Mon Sep 17 00:00:00 2001 From: weidai Date: Wed, 16 Jul 2003 01:53:45 +0000 Subject: added support for using encoding parameters and key derivation parameters git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@98 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- ida.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'ida.h') diff --git a/ida.h b/ida.h index 092ce8a..a19ff85 100644 --- a/ida.h +++ b/ida.h @@ -21,7 +21,7 @@ public: void ChannelData(word32 channelId, const byte *inString, unsigned int length, bool messageEnd); unsigned int InputBuffered(word32 channelId) const; - void ChannelInitialize(const std::string &channel, const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1); + void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); unsigned int ChannelPut2(const std::string &channel, const byte *begin, unsigned int length, int messageEnd, bool blocking) { if (!blocking) @@ -53,14 +53,14 @@ protected: }; /// a variant of Shamir's Secret Sharing Algorithm -class SecretSharing : public CustomSignalPropagation +class SecretSharing : public CustomFlushPropagation { public: SecretSharing(RandomNumberGenerator &rng, int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true) - : CustomSignalPropagation(attachment), m_rng(rng), m_ida(new OutputProxy(*this, true)) - {Initialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding), 0);} + : CustomFlushPropagation(attachment), m_rng(rng), m_ida(new OutputProxy(*this, true)) + {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding));} - void Initialize(const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1); + void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking); bool Flush(bool hardFlush, int propagation=-1, bool blocking=true) {return m_ida.Flush(hardFlush, propagation, blocking);} @@ -76,9 +76,9 @@ class SecretRecovery : public RawIDA public: SecretRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true) : RawIDA(attachment) - {Initialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding), 0);} + {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding));} - void Initialize(const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1); + void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); protected: void FlushOutputQueues(); @@ -88,14 +88,14 @@ protected: }; /// a variant of Rabin's Information Dispersal Algorithm -class InformationDispersal : public CustomSignalPropagation +class InformationDispersal : public CustomFlushPropagation { public: InformationDispersal(int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true) - : CustomSignalPropagation(attachment), m_ida(new OutputProxy(*this, true)) - {Initialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding), 0);} + : CustomFlushPropagation(attachment), m_ida(new OutputProxy(*this, true)) + {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding));} - void Initialize(const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1); + void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking); bool Flush(bool hardFlush, int propagation=-1, bool blocking=true) {return m_ida.Flush(hardFlush, propagation, blocking);} @@ -111,9 +111,9 @@ class InformationRecovery : public RawIDA public: InformationRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true) : RawIDA(attachment) - {Initialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding), 0);} + {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding));} - void Initialize(const NameValuePairs ¶meters=g_nullNameValuePairs, int propagation=-1); + void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); protected: void FlushOutputQueues(); -- cgit v1.2.1