亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? filters.cpp

?? hashish-1.1b加密算法庫c++
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
	xorbuf(m_buf+m_total, begin, STDMIN(length, SaturatingSubtract(m_size, m_total)));	m_total += length;	return 0;}// *************************************************************unsigned int StreamTransformationFilter::LastBlockSize(StreamTransformation &c, BlockPaddingScheme padding){	if (c.MinLastBlockSize() > 0)		return c.MinLastBlockSize();	else if (c.MandatoryBlockSize() > 1 && !c.IsForwardTransformation() && padding != NO_PADDING && padding != ZEROS_PADDING)		return c.MandatoryBlockSize();	else		return 0;}StreamTransformationFilter::StreamTransformationFilter(StreamTransformation &c, BufferedTransformation *attachment, BlockPaddingScheme padding)   : FilterWithBufferedInput(0, c.MandatoryBlockSize(), LastBlockSize(c, padding), attachment)	, m_cipher(c){	assert(c.MinLastBlockSize() == 0 || c.MinLastBlockSize() > c.MandatoryBlockSize());	bool isBlockCipher = (c.MandatoryBlockSize() > 1 && c.MinLastBlockSize() == 0);	if (padding == DEFAULT_PADDING)	{		if (isBlockCipher)			m_padding = PKCS_PADDING;		else			m_padding = NO_PADDING;	}	else		m_padding = padding;	if (!isBlockCipher && (m_padding == PKCS_PADDING || m_padding == ONE_AND_ZEROS_PADDING))		throw InvalidArgument("StreamTransformationFilter: PKCS_PADDING and ONE_AND_ZEROS_PADDING cannot be used with " + c.AlgorithmName());}void StreamTransformationFilter::FirstPut(const byte *inString){	m_optimalBufferSize = m_cipher.OptimalBlockSize();	m_optimalBufferSize = STDMAX(m_optimalBufferSize, RoundDownToMultipleOf(4096U, m_optimalBufferSize));}void StreamTransformationFilter::NextPutMultiple(const byte *inString, unsigned int length){	if (!length)		return;	unsigned int s = m_cipher.MandatoryBlockSize();	do	{		unsigned int len = m_optimalBufferSize;		byte *space = HelpCreatePutSpace(*AttachedTransformation(), NULL_CHANNEL, s, length, len);		if (len < length)		{			if (len == m_optimalBufferSize)				len -= m_cipher.GetOptimalBlockSizeUsed();			len = RoundDownToMultipleOf(len, s);		}		else			len = length;		m_cipher.ProcessString(space, inString, len);		AttachedTransformation()->PutModifiable(space, len);		inString += len;		length -= len;	}	while (length > 0);}void StreamTransformationFilter::NextPutModifiable(byte *inString, unsigned int length){	m_cipher.ProcessString(inString, length);	AttachedTransformation()->PutModifiable(inString, length);}void StreamTransformationFilter::LastPut(const byte *inString, unsigned int length){	byte *space = NULL;		switch (m_padding)	{	case NO_PADDING:	case ZEROS_PADDING:		if (length > 0)		{			unsigned int minLastBlockSize = m_cipher.MinLastBlockSize();			bool isForwardTransformation = m_cipher.IsForwardTransformation();			if (isForwardTransformation && m_padding == ZEROS_PADDING && (minLastBlockSize == 0 || length < minLastBlockSize))			{				// do padding				unsigned int blockSize = STDMAX(minLastBlockSize, m_cipher.MandatoryBlockSize());				space = HelpCreatePutSpace(*AttachedTransformation(), NULL_CHANNEL, blockSize);				memcpy(space, inString, length);				memset(space + length, 0, blockSize - length);				m_cipher.ProcessLastBlock(space, space, blockSize);				AttachedTransformation()->Put(space, blockSize);			}			else			{				if (minLastBlockSize == 0)				{					if (isForwardTransformation)						throw InvalidDataFormat("StreamTransformationFilter: plaintext length is not a multiple of block size and NO_PADDING is specified");					else						throw InvalidCiphertext("StreamTransformationFilter: ciphertext length is not a multiple of block size");				}				space = HelpCreatePutSpace(*AttachedTransformation(), NULL_CHANNEL, length, m_optimalBufferSize);				m_cipher.ProcessLastBlock(space, inString, length);				AttachedTransformation()->Put(space, length);			}		}		break;	case PKCS_PADDING:	case ONE_AND_ZEROS_PADDING:		unsigned int s;		s = m_cipher.MandatoryBlockSize();		assert(s > 1);		space = HelpCreatePutSpace(*AttachedTransformation(), NULL_CHANNEL, s, m_optimalBufferSize);		if (m_cipher.IsForwardTransformation())		{			assert(length < s);			memcpy(space, inString, length);			if (m_padding == PKCS_PADDING)			{				assert(s < 256);				byte pad = s-length;				memset(space+length, pad, s-length);			}			else			{				space[length] = 1;				memset(space+length+1, 0, s-length-1);			}			m_cipher.ProcessData(space, space, s);			AttachedTransformation()->Put(space, s);		}		else		{			if (length != s)				throw InvalidCiphertext("StreamTransformationFilter: ciphertext length is not a multiple of block size");			m_cipher.ProcessData(space, inString, s);			if (m_padding == PKCS_PADDING)			{				byte pad = space[s-1];				if (pad < 1 || pad > s || std::find_if(space+s-pad, space+s, std::bind2nd(std::not_equal_to<byte>(), pad)) != space+s)					throw InvalidCiphertext("StreamTransformationFilter: invalid PKCS #7 block padding found");				length = s-pad;			}			else			{				while (length > 1 && space[length-1] == '\0')					--length;				if (space[--length] != '\1')					throw InvalidCiphertext("StreamTransformationFilter: invalid ones-and-zeros padding found");			}			AttachedTransformation()->Put(space, length);		}		break;	default:		assert(false);	}}// *************************************************************void HashFilter::IsolatedInitialize(const NameValuePairs &parameters){	m_putMessage = parameters.GetValueWithDefault(Name::PutMessage(), false);	m_hashModule.Restart();}unsigned int HashFilter::Put2(const byte *inString, unsigned int length, int messageEnd, bool blocking){	FILTER_BEGIN;	m_hashModule.Update(inString, length);	if (m_putMessage)		FILTER_OUTPUT(1, inString, length, 0);	if (messageEnd)	{		{			unsigned int size, digestSize = m_hashModule.DigestSize();			m_space = HelpCreatePutSpace(*AttachedTransformation(), NULL_CHANNEL, digestSize, digestSize, size = digestSize);			m_hashModule.Final(m_space);		}		FILTER_OUTPUT(2, m_space, m_hashModule.DigestSize(), messageEnd);	}	FILTER_END_NO_MESSAGE_END;}// *************************************************************HashVerificationFilter::HashVerificationFilter(HashTransformation &hm, BufferedTransformation *attachment, word32 flags)	: FilterWithBufferedInput(attachment)	, m_hashModule(hm){	IsolatedInitialize(MakeParameters(Name::HashVerificationFilterFlags(), flags));}void HashVerificationFilter::InitializeDerivedAndReturnNewSizes(const NameValuePairs &parameters, unsigned int &firstSize, unsigned int &blockSize, unsigned int &lastSize){	m_flags = parameters.GetValueWithDefault(Name::HashVerificationFilterFlags(), (word32)DEFAULT_FLAGS);	m_hashModule.Restart();	unsigned int size = m_hashModule.DigestSize();	m_verified = false;	firstSize = m_flags & HASH_AT_BEGIN ? size : 0;	blockSize = 1;	lastSize = m_flags & HASH_AT_BEGIN ? 0 : size;}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());	}}void HashVerificationFilter::NextPutMultiple(const byte *inString, unsigned int length){	m_hashModule.Update(inString, length);	if (m_flags & PUT_MESSAGE)		AttachedTransformation()->Put(inString, length);}void HashVerificationFilter::LastPut(const byte *inString, unsigned int length){	if (m_flags & HASH_AT_BEGIN)	{		assert(length == 0);		m_verified = m_hashModule.Verify(m_expectedHash);	}	else	{		m_verified = (length==m_hashModule.DigestSize() && m_hashModule.Verify(inString));		if (m_flags & PUT_HASH)			AttachedTransformation()->Put(inString, length);	}	if (m_flags & PUT_RESULT)		AttachedTransformation()->Put(m_verified);	if ((m_flags & THROW_EXCEPTION) && !m_verified)		throw HashVerificationFailed();}// *************************************************************void SignerFilter::IsolatedInitialize(const NameValuePairs &parameters){	m_putMessage = parameters.GetValueWithDefault(Name::PutMessage(), false);	m_messageAccumulator.reset(m_signer.NewSignatureAccumulator());}unsigned int SignerFilter::Put2(const byte *inString, unsigned int length, int messageEnd, bool blocking){	FILTER_BEGIN;	m_messageAccumulator->Update(inString, length);	if (m_putMessage)		FILTER_OUTPUT(1, inString, length, 0);	if (messageEnd)	{		m_buf.New(m_signer.SignatureLength());		m_signer.Sign(m_rng, m_messageAccumulator.release(), m_buf);		FILTER_OUTPUT(2, m_buf, m_buf.size(), messageEnd);		m_messageAccumulator.reset(m_signer.NewSignatureAccumulator());	}	FILTER_END_NO_MESSAGE_END;}SignatureVerificationFilter::SignatureVerificationFilter(const PK_Verifier &verifier, BufferedTransformation *attachment, word32 flags)	: FilterWithBufferedInput(attachment)	, m_verifier(verifier){	IsolatedInitialize(MakeParameters(Name::SignatureVerificationFilterFlags(), flags));}void SignatureVerificationFilter::InitializeDerivedAndReturnNewSizes(const NameValuePairs &parameters, unsigned int &firstSize, unsigned int &blockSize, unsigned int &lastSize){	m_flags = parameters.GetValueWithDefault(Name::SignatureVerificationFilterFlags(), (word32)DEFAULT_FLAGS);	m_messageAccumulator.reset(m_verifier.NewVerificationAccumulator());	unsigned int size =	m_verifier.SignatureLength();	assert(size != 0);	// TODO: handle recoverable signature scheme	m_verified = false;	firstSize = m_flags & SIGNATURE_AT_BEGIN ? size : 0;	blockSize = 1;	lastSize = m_flags & SIGNATURE_AT_BEGIN ? 0 : size;}void SignatureVerificationFilter::FirstPut(const byte *inString){	if (m_flags & SIGNATURE_AT_BEGIN)	{		if (m_verifier.SignatureUpfront())			m_verifier.InputSignature(*m_messageAccumulator, inString, m_verifier.SignatureLength());		else		{			m_signature.New(m_verifier.SignatureLength());			memcpy(m_signature, inString, m_signature.size());		}		if (m_flags & PUT_SIGNATURE)			AttachedTransformation()->Put(inString, m_signature.size());	}	else	{		assert(!m_verifier.SignatureUpfront());	}}void SignatureVerificationFilter::NextPutMultiple(const byte *inString, unsigned int length){	m_messageAccumulator->Update(inString, length);	if (m_flags & PUT_MESSAGE)		AttachedTransformation()->Put(inString, length);}void SignatureVerificationFilter::LastPut(const byte *inString, unsigned int length){	if (m_flags & SIGNATURE_AT_BEGIN)	{		assert(length == 0);		m_verifier.InputSignature(*m_messageAccumulator, m_signature, m_signature.size());		m_verified = m_verifier.VerifyAndRestart(*m_messageAccumulator);	}	else	{		m_verifier.InputSignature(*m_messageAccumulator, inString, length);		m_verified = m_verifier.VerifyAndRestart(*m_messageAccumulator);		if (m_flags & PUT_SIGNATURE)			AttachedTransformation()->Put(inString, length);	}	if (m_flags & PUT_RESULT)		AttachedTransformation()->Put(m_verified);	if ((m_flags & THROW_EXCEPTION) && !m_verified)		throw SignatureVerificationFailed();}// *************************************************************unsigned int Source::PumpAll2(bool blocking){	// TODO: switch length type	unsigned long i = UINT_MAX;	RETURN_IF_NONZERO(Pump2(i, blocking));	unsigned int j = UINT_MAX;	return PumpMessages2(j, blocking);}bool Store::GetNextMessage(){	if (!m_messageEnd && !AnyRetrievable())	{		m_messageEnd=true;		return true;	}	else		return false;}unsigned int Store::CopyMessagesTo(BufferedTransformation &target, unsigned int count, const std::string &channel) const{	if (m_messageEnd || count == 0)		return 0;	else	{		CopyTo(target, ULONG_MAX, channel);		if (GetAutoSignalPropagation())			target.ChannelMessageEnd(channel, GetAutoSignalPropagation()-1);		return 1;	}}void StringStore::StoreInitialize(const NameValuePairs &parameters){	ConstByteArrayParameter array;	if (!parameters.GetValue(Name::InputBuffer(), array))		throw InvalidArgument("StringStore: missing InputBuffer argument");	m_store = array.begin();	m_length = array.size();	m_count = 0;}unsigned int StringStore::TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel, bool blocking){	unsigned long position = 0;	unsigned int blockedBytes = CopyRangeTo2(target, position, transferBytes, channel, blocking);	m_count += position;	transferBytes = position;	return blockedBytes;}unsigned int StringStore::CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end, const std::string &channel, bool blocking) const{	unsigned int i = (unsigned int)STDMIN((unsigned long)m_count+begin, (unsigned long)m_length);	unsigned int len = (unsigned int)STDMIN((unsigned long)m_length-i, end-begin);	unsigned int blockedBytes = target.ChannelPut2(channel, m_store+i, len, 0, blocking);	if (!blockedBytes)		begin += len;	return blockedBytes;}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());	return 0;}unsigned int NullStore::CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end, const std::string &channel, bool blocking) const{	static const byte nullBytes[128] = {0};	while (begin < end)	{		unsigned int len = STDMIN(end-begin, 128UL);		unsigned int blockedBytes = target.ChannelPut2(channel, nullBytes, len, 0, blocking);		if (blockedBytes)			return blockedBytes;		begin += len;	}	return 0;}unsigned int NullStore::TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel, bool blocking){	unsigned long begin = 0;	unsigned int blockedBytes = NullStore::CopyRangeTo2(target, begin, transferBytes, channel, blocking);	transferBytes = begin;	m_size -= begin;	return blockedBytes;}NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲高清免费在线| 亚洲精品写真福利| 欧美96一区二区免费视频| 欧美性大战xxxxx久久久| 亚洲精品自拍动漫在线| 91久久精品午夜一区二区| 悠悠色在线精品| 欧美亚男人的天堂| 日本不卡视频一二三区| 欧美va亚洲va香蕉在线| 国产一区二区三区在线观看免费| 亚洲欧洲日本在线| 91丨国产丨九色丨pron| 亚洲成av人片一区二区梦乃 | 亚洲人成网站影音先锋播放| 波多野结衣在线aⅴ中文字幕不卡| 中文字幕视频一区| 在线播放亚洲一区| 国产精品一卡二| 中文字幕日韩av资源站| 欧美日韩成人一区| 国产白丝精品91爽爽久久| 亚洲精品免费一二三区| 欧美精品久久99久久在免费线| 人人狠狠综合久久亚洲| 中文字幕乱码亚洲精品一区| 欧洲亚洲精品在线| 精品一区二区三区免费毛片爱| 中文字幕一区二区视频| 欧美人xxxx| av中文一区二区三区| 亚洲动漫第一页| 国产亚洲精品福利| 宅男在线国产精品| 成人爱爱电影网址| 美洲天堂一区二卡三卡四卡视频 | 国产精品成人一区二区艾草 | 国产欧美一区二区精品久导航| 日本高清不卡一区| 国产精品一区2区| 亚洲大片一区二区三区| 国产精品入口麻豆原神| 日韩欧美一级二级| 在线免费观看视频一区| 成人综合日日夜夜| 久久黄色级2电影| 亚洲精品老司机| 国产午夜精品一区二区| 91精品国产一区二区三区蜜臀| 成人av电影观看| 国产乱码精品1区2区3区| 日韩精品亚洲一区| 一区二区三区中文字幕在线观看| 久久看人人爽人人| 91 com成人网| 欧美性猛交xxxx乱大交退制版| 暴力调教一区二区三区| 国产毛片一区二区| 裸体在线国模精品偷拍| 亚洲国产一区在线观看| 亚洲男人的天堂一区二区| 国产亚洲综合在线| 26uuu欧美日本| 欧美xxx久久| 欧美变态tickle挠乳网站| 日韩一区二区三区在线视频| 欧美系列一区二区| 欧美中文字幕一区二区三区亚洲| 99精品视频在线观看免费| 成人性生交大片免费看中文网站 | 国产精品99久久久久久有的能看 | 国产成人免费视频精品含羞草妖精 | 6080yy午夜一二三区久久| 色就色 综合激情| 99riav久久精品riav| 成人av集中营| 99re6这里只有精品视频在线观看| 成人一区二区在线观看| 99精品视频一区| 在线看不卡av| 欧美人妖巨大在线| 欧美一区二区播放| 精品日韩欧美在线| 国产亚洲成av人在线观看导航| 国产日韩视频一区二区三区| 中文字幕免费不卡| 亚洲图片另类小说| 一区二区在线电影| 亚洲福利一区二区三区| 日韩和欧美一区二区三区| 男女激情视频一区| 国产精品99久久久久久久女警 | 精品区一区二区| 久久综合成人精品亚洲另类欧美 | 在线国产电影不卡| 欧美日韩国产三级| 精品国产一区二区亚洲人成毛片 | 捆绑调教美女网站视频一区| 久久电影网电视剧免费观看| 国产suv精品一区二区6| 不卡av在线网| 欧美日韩黄色影视| 国产亚洲综合色| 亚洲男帅同性gay1069| 日本伊人精品一区二区三区观看方式| 午夜激情久久久| 国产麻豆精品一区二区| 91蜜桃在线观看| 777色狠狠一区二区三区| 欧美大肚乱孕交hd孕妇| 亚洲欧美怡红院| 日韩精品一二三四| jlzzjlzz亚洲女人18| 欧美男男青年gay1069videost| 久久精品亚洲麻豆av一区二区| 亚洲视频一二三区| 免费在线看成人av| 99视频一区二区| 日韩欧美成人激情| 一区二区三区蜜桃网| 国内成人精品2018免费看| 色综合天天狠狠| 精品sm捆绑视频| 亚洲午夜久久久| 国产成人精品免费一区二区| 欧美喷水一区二区| 国产精品网站在线播放| 免费在线观看一区| 在线观看一区二区精品视频| 国产欧美一区二区三区网站| 日韩黄色片在线观看| 91亚洲男人天堂| 久久天天做天天爱综合色| 亚洲国产一区二区三区青草影视| 国产69精品一区二区亚洲孕妇 | 欧美午夜精品电影| 亚洲国产精华液网站w| 美女尤物国产一区| 欧亚一区二区三区| 综合网在线视频| 国产精一品亚洲二区在线视频| 在线播放中文字幕一区| 亚洲一级在线观看| 99国产欧美久久久精品| 国产午夜一区二区三区| 精品亚洲porn| 欧美一区二区观看视频| 五月天网站亚洲| 精品视频在线看| 亚洲免费观看高清完整版在线观看 | 在线视频一区二区三| 国产精品日日摸夜夜摸av| 国产一区啦啦啦在线观看| 日韩一区二区在线观看视频播放| 性久久久久久久| 欧美影片第一页| 亚洲精品国产第一综合99久久| 97久久超碰精品国产| 中文字幕在线一区免费| 国产激情一区二区三区| 精品国产欧美一区二区| 久久99蜜桃精品| 2017欧美狠狠色| 韩国精品久久久| 国产午夜亚洲精品不卡| 国产精品77777| 国产欧美综合色| 成人免费毛片aaaaa**| 欧美国产欧美综合| 成人激情开心网| 中文字幕综合网| 欧美系列日韩一区| 婷婷丁香激情综合| 91精品国产91久久久久久一区二区 | 欧美一区二区美女| 久久99精品久久久久久久久久久久 | 狠狠色综合日日| 国产午夜亚洲精品理论片色戒| 丁香网亚洲国际| 亚洲女人小视频在线观看| 日本道色综合久久| 日韩国产在线一| 久久网这里都是精品| 成人av电影免费观看| 亚洲欧美日韩国产综合| 欧美久久久久久久久| 精品一区中文字幕| 国产视频911| 91在线观看免费视频| 夜夜嗨av一区二区三区 | 欧美mv日韩mv国产网站app| 国产一区二区三区不卡在线观看 | 国产精品网站一区| 91精品1区2区| 久久精品国产色蜜蜜麻豆| 中文在线一区二区| 在线一区二区三区四区五区| 奇米精品一区二区三区在线观看| 国产亚洲欧美色| 欧美影院一区二区|