当前位置: 首页>>代码示例>>C++>>正文


C++ AttachedTransformation函数代码示例

本文整理汇总了C++中AttachedTransformation函数的典型用法代码示例。如果您正苦于以下问题:C++ AttachedTransformation函数的具体用法?C++ AttachedTransformation怎么用?C++ AttachedTransformation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AttachedTransformation函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AttachedTransformation

size_t BufferedTransformation::Get(byte *outString, size_t getMax)
{
	if (AttachedTransformation())
		return AttachedTransformation()->Get(outString, getMax);
	else
	{
		ArraySink arraySink(outString, getMax);
		return (size_t)TransferTo(arraySink, getMax);
	}
}
开发者ID:superbitcoin,项目名称:SuperBitcoin,代码行数:10,代码来源:cryptlib.cpp

示例2: paddingRemover

void InformationRecovery::OutputMessageEnds()
{
	if (m_pad)
	{
		PaddingRemover paddingRemover(new Redirector(*AttachedTransformation()));
		m_queue.TransferAllTo(paddingRemover);
	}

	if (GetAutoSignalPropagation() != 0)
		AttachedTransformation()->MessageEnd(GetAutoSignalPropagation()-1);
}
开发者ID:Audifire,项目名称:mtasa-blue,代码行数:11,代码来源:ida.cpp

示例3: while

void InformationRecovery::FlushOutputQueues()
{
	while (m_outputQueues[0].AnyRetrievable())
	{
		for (unsigned int i=0; i<m_outputChannelIds.size(); i++)
			m_outputQueues[i].TransferTo(m_queue, 1);
	}

	if (m_pad)
		m_queue.TransferTo(*AttachedTransformation(), m_queue.MaxRetrievable()-4*m_threshold);
	else
		m_queue.TransferTo(*AttachedTransformation());
}
开发者ID:Audifire,项目名称:mtasa-blue,代码行数:13,代码来源:ida.cpp

示例4: xorbuf

void VDA_CBCNotPaddedDecryptor_3_2::NextPut(const byte *inString, unsigned int)
{
   cipher.ProcessBlock(inString, buffer);
   xorbuf(buffer, reg, S);
   AttachedTransformation()->Put(buffer, S);
   memcpy(reg, inString, S);
}
开发者ID:dcblake,项目名称:SMP,代码行数:7,代码来源:sm_vda_cbc_3_2.cpp

示例5: size_t

void RawIDA::ProcessInputQueues()
{
	bool finished = (m_channelsFinished == size_t(m_threshold));
	unsigned int i;

	while (finished ? m_channelsReady > 0 : m_channelsReady == size_t(m_threshold))
	{
		m_channelsReady = 0;
		for (i=0; i<size_t(m_threshold); i++)
		{
			MessageQueue &queue = m_inputQueues[i];
			queue.GetWord32(m_y[i]);

			if (finished)
				m_channelsReady += queue.AnyRetrievable();
			else
				m_channelsReady += queue.NumberOfMessages() > 0 || queue.MaxRetrievable() >= 4;
		}

		for (i=0; (unsigned int)i<m_outputChannelIds.size(); i++)
		{
			if (m_outputToInput[i] != size_t(m_threshold))
				m_outputQueues[i].PutWord32(m_y[m_outputToInput[i]]);
			else if (m_v[i].size() == size_t(m_threshold))
				m_outputQueues[i].PutWord32(BulkPolynomialInterpolateAt(field, m_y.begin(), m_v[i].begin(), m_threshold));
			else
			{
				m_u.resize(m_threshold);
				PrepareBulkPolynomialInterpolationAt(field, m_u.begin(), m_outputChannelIds[i], &(m_inputChannelIds[0]), m_w.begin(), m_threshold);
				m_outputQueues[i].PutWord32(BulkPolynomialInterpolateAt(field, m_y.begin(), m_u.begin(), m_threshold));
			}
		}
	}

	if (m_outputChannelIds.size() > 0 && m_outputQueues[0].AnyRetrievable())
		FlushOutputQueues();

	if (finished)
	{
		OutputMessageEnds();

		m_channelsReady = 0;
		m_channelsFinished = 0;
		m_v.clear();

		std::vector<MessageQueue> inputQueues;
		std::vector<word32> inputChannelIds;

		inputQueues.swap(m_inputQueues);
		inputChannelIds.swap(m_inputChannelIds);
		m_inputChannelMap.clear();
		m_lastMapPosition = m_inputChannelMap.end();

		for (i=0; i<size_t(m_threshold); i++)
		{
			inputQueues[i].GetNextMessage();
			inputQueues[i].TransferAllTo(*AttachedTransformation(), WordToString(inputChannelIds[i]));
		}
	}
}
开发者ID:Audifire,项目名称:mtasa-blue,代码行数:60,代码来源:ida.cpp

示例6: AttachedTransformation

void MeterFilter::Put(const byte *inString, unsigned int length)
{
	m_currentMessageBytes += length;
	m_totalBytes += length;
	if (m_transparent)
		AttachedTransformation()->Put(inString, length);
}
开发者ID:mentat,项目名称:nnim,代码行数:7,代码来源:filters.cpp

示例7: buf

void HashFilter::MessageEnd(int propagation)
{
	SecByteBlock buf(m_hashModule.DigestSize());
	m_hashModule.Final(buf);
	AttachedTransformation()->Put(buf, buf.size);
	Filter::MessageEnd(propagation);
}
开发者ID:mentat,项目名称:nnim,代码行数:7,代码来源:filters.cpp

示例8: BlockingInputOnly

size_t PaddingRemover::Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
{
	if (!blocking)
		throw BlockingInputOnly("PaddingRemover");

	const byte *const end = begin + length;

	if (m_possiblePadding)
	{
		size_t len = std::find_if(begin, end, std::bind2nd(std::not_equal_to<byte>(), byte(0))) - begin;
		m_zeroCount += len;
		begin += len;
		if (begin == end)
			return 0;

		AttachedTransformation()->Put(1);
		while (m_zeroCount--)
			AttachedTransformation()->Put(0);
		AttachedTransformation()->Put(*begin++);
		m_possiblePadding = false;
	}

#if defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__MWERKS__)
	// VC60 and VC7 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one
	typedef std::reverse_bidirectional_iterator<const byte *, const byte> RevIt;
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
	typedef std::reverse_iterator<const byte *, std::random_access_iterator_tag, const byte> RevIt;
#else
	typedef std::reverse_iterator<const byte *> RevIt;
#endif
	const byte *x = std::find_if(RevIt(end), RevIt(begin), std::bind2nd(std::not_equal_to<byte>(), byte(0))).base();
	if (x != begin && *(x-1) == 1)
	{
		AttachedTransformation()->Put(begin, x-begin-1);
		m_possiblePadding = true;
		m_zeroCount = end - x;
	}
	else
		AttachedTransformation()->Put(begin, end-begin);

	if (messageEnd)
	{
		m_possiblePadding = false;
		Output(0, begin, length, messageEnd, blocking);
	}
	return 0;
}
开发者ID:Audifire,项目名称:mtasa-blue,代码行数:47,代码来源:ida.cpp

示例9: AttachedTransformation

unsigned int Filter::OutputModifiable(int outputSite, byte *inString, unsigned int length, int messageEnd, bool blocking, const std::string &channel)
{
	if (messageEnd)
		messageEnd--;
	unsigned int result = AttachedTransformation()->PutModifiable2(inString, length, messageEnd, blocking);
	m_continueAt = result ? outputSite : 0;
	return result;
}
开发者ID:jratcliff63367,项目名称:compressiontest,代码行数:8,代码来源:filters.cpp

示例10: AttachedTransformation

size_t Filter::Output(int outputSite, const byte *inString, size_t length, int messageEnd, bool blocking, const std::string &channel)
{
	if (messageEnd)
		messageEnd--;
	size_t result = AttachedTransformation()->ChannelPut2(channel, inString, length, messageEnd, blocking);
	m_continueAt = result ? outputSite : 0;
	return result;
}
开发者ID:prakhs123,项目名称:cryptopp,代码行数:8,代码来源:filters.cpp

示例11: AttachedTransformation

void RawIDA::OutputMessageEnds()
{
	if (GetAutoSignalPropagation() != 0)
	{
		for (unsigned int i=0; i<m_outputChannelIds.size(); i++)
			AttachedTransformation()->ChannelMessageEnd(m_outputChannelIdStrings[i], GetAutoSignalPropagation()-1);
	}
}
开发者ID:Audifire,项目名称:mtasa-blue,代码行数:8,代码来源:ida.cpp

示例12: memcpy

void HashVerifier::FirstPut(const byte *inString)
{
	if (m_flags & HASH_AT_BEGIN)
	{
		memcpy(m_expectedHash, inString, m_expectedHash.size);
		if (m_flags & PUT_HASH)
			AttachedTransformation()->Put(inString, m_expectedHash.size);
	}
}
开发者ID:mentat,项目名称:nnim,代码行数:9,代码来源:filters.cpp

示例13: OutputMessageSeriesEnd

bool Filter::OutputMessageSeriesEnd(int outputSite, int propagation, bool blocking, const std::string &channel)
{
	if (propagation && AttachedTransformation()->ChannelMessageSeriesEnd(channel, propagation-1, blocking))
	{
		m_continueAt = outputSite;
		return true;
	}
	m_continueAt = 0;
	return false;
}
开发者ID:prakhs123,项目名称:cryptopp,代码行数:10,代码来源:filters.cpp

示例14: memcpy

void HashVerificationFilter::FirstPut(const byte *inString)
{
	if (m_flags & HASH_AT_BEGIN)
	{
		m_expectedHash.New(m_hashModule.DigestSize());
		memcpy(m_expectedHash, inString, m_expectedHash.size());
		if (m_flags & PUT_HASH)
			AttachedTransformation()->Put(inString, m_expectedHash.size());
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:10,代码来源:filters.cpp

示例15: OutputFlush

bool Filter::OutputFlush(int outputSite, bool hardFlush, int propagation, bool blocking, const std::string &channel)
{
	if (propagation && AttachedTransformation()->ChannelFlush(channel, hardFlush, propagation-1, blocking))
	{
		m_continueAt = outputSite;
		return true;
	}
	m_continueAt = 0;
	return false;
}
开发者ID:prakhs123,项目名称:cryptopp,代码行数:10,代码来源:filters.cpp


注:本文中的AttachedTransformation函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。