summaryrefslogtreecommitdiff
path: root/ida.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-16 01:53:45 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-16 01:53:45 +0000
commit42c3d8f3aa593c224174558fd6f3d2709e08f7d0 (patch)
tree1f90c9ea7a31679b5c416408a3ffeba23e87d165 /ida.h
parent09326fa9f564c09ebecff7c56d0e33555dec65b6 (diff)
downloadcryptopp-42c3d8f3aa593c224174558fd6f3d2709e08f7d0.tar.gz
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
Diffstat (limited to 'ida.h')
-rw-r--r--ida.h26
1 files changed, 13 insertions, 13 deletions
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 &parameters=g_nullNameValuePairs, int propagation=-1);
+ void IsolatedInitialize(const NameValuePairs &parameters=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<Filter>
+class SecretSharing : public CustomFlushPropagation<Filter>
{
public:
SecretSharing(RandomNumberGenerator &rng, int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true)
- : CustomSignalPropagation<Filter>(attachment), m_rng(rng), m_ida(new OutputProxy(*this, true))
- {Initialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding), 0);}
+ : CustomFlushPropagation<Filter>(attachment), m_rng(rng), m_ida(new OutputProxy(*this, true))
+ {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding));}
- void Initialize(const NameValuePairs &parameters=g_nullNameValuePairs, int propagation=-1);
+ void IsolatedInitialize(const NameValuePairs &parameters=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 &parameters=g_nullNameValuePairs, int propagation=-1);
+ void IsolatedInitialize(const NameValuePairs &parameters=g_nullNameValuePairs);
protected:
void FlushOutputQueues();
@@ -88,14 +88,14 @@ protected:
};
/// a variant of Rabin's Information Dispersal Algorithm
-class InformationDispersal : public CustomSignalPropagation<Filter>
+class InformationDispersal : public CustomFlushPropagation<Filter>
{
public:
InformationDispersal(int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true)
- : CustomSignalPropagation<Filter>(attachment), m_ida(new OutputProxy(*this, true))
- {Initialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding), 0);}
+ : CustomFlushPropagation<Filter>(attachment), m_ida(new OutputProxy(*this, true))
+ {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding));}
- void Initialize(const NameValuePairs &parameters=g_nullNameValuePairs, int propagation=-1);
+ void IsolatedInitialize(const NameValuePairs &parameters=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 &parameters=g_nullNameValuePairs, int propagation=-1);
+ void IsolatedInitialize(const NameValuePairs &parameters=g_nullNameValuePairs);
protected:
void FlushOutputQueues();