10 NAMESPACE_BEGIN(CryptoPP)
19 unsigned int GetThreshold()
const {
return m_threshold;}
20 void AddOutputChannel(word32 channelId);
21 void ChannelData(word32 channelId,
const byte *inString,
size_t length,
bool messageEnd);
22 lword InputBuffered(word32 channelId)
const;
25 size_t ChannelPut2(
const std::string &channel,
const byte *begin,
size_t length,
int messageEnd,
bool blocking)
29 ChannelData(StringToWord<word32>(channel), begin, length, messageEnd != 0);
34 virtual void FlushOutputQueues();
35 virtual void OutputMessageEnds();
37 unsigned int InsertInputChannel(word32 channelId);
38 unsigned int LookupInputChannel(word32 channelId)
const;
39 void ComputeV(
unsigned int);
40 void PrepareInterpolation();
41 void ProcessInputQueues();
43 typedef std::map<word32, unsigned int> InputChannelMap;
44 InputChannelMap m_inputChannelMap;
45 InputChannelMap::iterator m_lastMapPosition;
46 std::vector<MessageQueue> m_inputQueues;
47 std::vector<word32> m_inputChannelIds, m_outputChannelIds, m_outputToInput;
48 std::vector<std::string> m_outputChannelIdStrings;
49 std::vector<ByteQueue> m_outputQueues;
51 unsigned int m_channelsReady, m_channelsFinished;
52 std::vector<SecBlock<word32> > m_v;
64 IsolatedInitialize(MakeParameters(
"RecoveryThreshold", threshold)(
"NumberOfShares", nShares)(
"AddPadding", addPadding));
68 size_t Put2(
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
69 bool Flush(
bool hardFlush,
int propagation=-1,
bool blocking=
true) {
return m_ida.Flush(hardFlush, propagation, blocking);}
83 {IsolatedInitialize(MakeParameters(
"RecoveryThreshold", threshold)(
"RemovePadding", removePadding));}
88 void FlushOutputQueues();
89 void OutputMessageEnds();
102 IsolatedInitialize(MakeParameters(
"RecoveryThreshold", threshold)(
"NumberOfShares", nShares)(
"AddPadding", addPadding));
106 size_t Put2(
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
107 bool Flush(
bool hardFlush,
int propagation=-1,
bool blocking=
true) {
return m_ida.Flush(hardFlush, propagation, blocking);}
112 unsigned int m_nextChannel;
121 {IsolatedInitialize(MakeParameters(
"RecoveryThreshold", threshold)(
"RemovePadding", removePadding));}
126 void FlushOutputQueues();
127 void OutputMessageEnds();
137 : m_possiblePadding(
false) {
Detach(attachment);}
139 void IsolatedInitialize(
const NameValuePairs ¶meters) {m_possiblePadding =
false;}
140 size_t Put2(
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
143 bool GetPossiblePadding()
const {
return m_possiblePadding;}
146 bool m_possiblePadding;
base class for secret sharing and information dispersal
interface for random number generators
bool Flush(bool hardFlush, int propagation=-1, bool blocking=true)
flush buffered input and/or output
void Detach(BufferedTransformation *newAttachment=NULL)
delete the current attachment chain and replace it with newAttachment
const NameValuePairs & g_nullNameValuePairs
empty set of name-value pairs
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
input multiple bytes for blocking or non-blocking processing
provides an implementation of BufferedTransformation's attachment interface
a variant of Shamir's Secret Sharing Algorithm
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
input multiple bytes for blocking or non-blocking processing
a variant of Shamir's Secret Sharing Algorithm
interface for retrieving values given their names