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

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

?? queue.cpp

?? hashish-1.1b加密算法庫c++
?? CPP
字號:
// queue.cpp - written and placed in the public domain by Wei Dai#include "pch.h"#include "queue.h"#include "filters.h"NAMESPACE_BEGIN(CryptoPP)// this class for use by ByteQueue onlyclass ByteQueueNode{public:	ByteQueueNode(unsigned int maxSize)		: buf(maxSize)	{		m_head = m_tail = 0;		next = 0;	}	inline unsigned int MaxSize() const {return buf.size();}	inline unsigned int CurrentSize() const	{		return m_tail-m_head;	}	inline bool UsedUp() const	{		return (m_head==MaxSize());	}	inline void Clear()	{		m_head = m_tail = 0;	}/*	inline unsigned int Put(byte inByte)	{		if (MaxSize()==m_tail)			return 0;		buf[m_tail++]=inByte;		return 1;	}*/	inline unsigned int Put(const byte *begin, unsigned int length)	{		unsigned int l = STDMIN(length, MaxSize()-m_tail);		memcpy(buf+m_tail, begin, l);		m_tail += l;		return l;	}	inline unsigned int Peek(byte &outByte) const	{		if (m_tail==m_head)			return 0;		outByte=buf[m_head];		return 1;	}	inline unsigned int Peek(byte *target, unsigned int copyMax) const	{		unsigned int len = STDMIN(copyMax, m_tail-m_head);		memcpy(target, buf+m_head, len);		return len;	}	inline unsigned int CopyTo(BufferedTransformation &target, const std::string &channel=BufferedTransformation::NULL_CHANNEL) const	{		unsigned int len = m_tail-m_head;		target.ChannelPut(channel, buf+m_head, len);		return len;	}	inline unsigned int CopyTo(BufferedTransformation &target, unsigned int copyMax, const std::string &channel=BufferedTransformation::NULL_CHANNEL) const	{		unsigned int len = STDMIN(copyMax, m_tail-m_head);		target.ChannelPut(channel, buf+m_head, len);		return len;	}	inline unsigned int Get(byte &outByte)	{		unsigned int len = Peek(outByte);		m_head += len;		return len;	}	inline unsigned int Get(byte *outString, unsigned int getMax)	{		unsigned int len = Peek(outString, getMax);		m_head += len;		return len;	}	inline unsigned int TransferTo(BufferedTransformation &target, const std::string &channel=BufferedTransformation::NULL_CHANNEL)	{		unsigned int len = m_tail-m_head;		target.ChannelPutModifiable(channel, buf+m_head, len);		m_head = m_tail;		return len;	}	inline unsigned int TransferTo(BufferedTransformation &target, unsigned int transferMax, const std::string &channel=BufferedTransformation::NULL_CHANNEL)	{		unsigned int len = STDMIN(transferMax, m_tail-m_head);		target.ChannelPutModifiable(channel, buf+m_head, len);		m_head += len;		return len;	}	inline unsigned int Skip(unsigned int skipMax)	{		unsigned int len = STDMIN(skipMax, m_tail-m_head);		m_head += len;		return len;	}	inline byte operator[](unsigned int i) const	{		return buf[m_head+i];	}	ByteQueueNode *next;	SecByteBlock buf;	unsigned int m_head, m_tail;};// ********************************************************ByteQueue::ByteQueue(unsigned int m_nodeSize)	: m_nodeSize(m_nodeSize), m_lazyLength(0){	m_head = m_tail = new ByteQueueNode(m_nodeSize);}ByteQueue::ByteQueue(const ByteQueue &copy){	CopyFrom(copy);}void ByteQueue::CopyFrom(const ByteQueue &copy){	m_lazyLength = 0;	m_nodeSize = copy.m_nodeSize;	m_head = m_tail = new ByteQueueNode(*copy.m_head);	for (ByteQueueNode *current=copy.m_head->next; current; current=current->next)	{		m_tail->next = new ByteQueueNode(*current);		m_tail = m_tail->next;	}	m_tail->next = NULL;	Put(copy.m_lazyString, copy.m_lazyLength);}ByteQueue::~ByteQueue(){	Destroy();}void ByteQueue::Destroy(){	ByteQueueNode *next;	for (ByteQueueNode *current=m_head; current; current=next)	{		next=current->next;		delete current;	}}void ByteQueue::IsolatedInitialize(const NameValuePairs &parameters){	m_nodeSize = parameters.GetIntValueWithDefault("NodeSize", 256);	Clear();}unsigned long ByteQueue::CurrentSize() const{	unsigned long size=0;	for (ByteQueueNode *current=m_head; current; current=current->next)		size += current->CurrentSize();	return size + m_lazyLength;}bool ByteQueue::IsEmpty() const{	return m_head==m_tail && m_head->CurrentSize()==0 && m_lazyLength==0;}void ByteQueue::Clear(){	Destroy();	m_head = m_tail = new ByteQueueNode(m_nodeSize);	m_lazyLength = 0;}unsigned int ByteQueue::Put2(const byte *inString, unsigned int length, int messageEnd, bool blocking){	if (m_lazyLength > 0)		FinalizeLazyPut();	unsigned int len;	while ((len=m_tail->Put(inString, length)) < length)	{		m_tail->next = new ByteQueueNode(m_nodeSize);		m_tail = m_tail->next;		inString += len;		length -= len;	}	return 0;}void ByteQueue::CleanupUsedNodes(){	while (m_head != m_tail && m_head->UsedUp())	{		ByteQueueNode *temp=m_head;		m_head=m_head->next;		delete temp;	}	if (m_head->CurrentSize() == 0)		m_head->Clear();}void ByteQueue::LazyPut(const byte *inString, unsigned int size){	if (m_lazyLength > 0)		FinalizeLazyPut();	m_lazyString = inString;	m_lazyLength = size;}void ByteQueue::UndoLazyPut(unsigned int size){	if (m_lazyLength < size)		throw InvalidArgument("ByteQueue: size specified for UndoLazyPut is too large");	m_lazyLength -= size;}void ByteQueue::FinalizeLazyPut(){	unsigned int len = m_lazyLength;	m_lazyLength = 0;	if (len)		Put(m_lazyString, len);}unsigned int ByteQueue::Get(byte &outByte){	if (m_head->Get(outByte))	{		if (m_head->UsedUp())			CleanupUsedNodes();		return 1;	}	else if (m_lazyLength > 0)	{		outByte = *m_lazyString++;		m_lazyLength--;		return 1;	}	else		return 0;}unsigned int ByteQueue::Get(byte *outString, unsigned int getMax){	ArraySink sink(outString, getMax);	return TransferTo(sink, getMax);}unsigned int ByteQueue::Peek(byte &outByte) const{	if (m_head->Peek(outByte))		return 1;	else if (m_lazyLength > 0)	{		outByte = *m_lazyString;		return 1;	}	else		return 0;}unsigned int ByteQueue::Peek(byte *outString, unsigned int peekMax) const{	ArraySink sink(outString, peekMax);	return CopyTo(sink, peekMax);}unsigned int ByteQueue::TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel, bool blocking){	if (blocking)	{		unsigned long bytesLeft = transferBytes;		for (ByteQueueNode *current=m_head; bytesLeft && current; current=current->next)			bytesLeft -= current->TransferTo(target, bytesLeft, channel);		CleanupUsedNodes();		unsigned int len = (unsigned int)STDMIN(bytesLeft, (unsigned long)m_lazyLength);		if (len)		{			target.ChannelPut(channel, m_lazyString, len);			m_lazyString += len;			m_lazyLength -= len;			bytesLeft -= len;		}		transferBytes -= bytesLeft;		return 0;	}	else	{		Walker walker(*this);		unsigned int blockedBytes = walker.TransferTo2(target, transferBytes, channel, blocking);		Skip(transferBytes);		return blockedBytes;	}}unsigned int ByteQueue::CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end, const std::string &channel, bool blocking) const{	Walker walker(*this);	walker.Skip(begin);	unsigned long transferBytes = end-begin;	unsigned int blockedBytes = walker.TransferTo2(target, transferBytes, channel, blocking);	begin += transferBytes;	return blockedBytes;}void ByteQueue::Unget(byte inByte){	Unget(&inByte, 1);}void ByteQueue::Unget(const byte *inString, unsigned int length){	// TODO: make this more efficient	ByteQueueNode *newHead = new ByteQueueNode(length);	newHead->next = m_head;	m_head = newHead;	m_head->Put(inString, length);}const byte * ByteQueue::Spy(unsigned int &contiguousSize) const{	contiguousSize = m_head->m_tail - m_head->m_head;	if (contiguousSize == 0 && m_lazyLength > 0)	{		contiguousSize = m_lazyLength;		return m_lazyString;	}	else		return m_head->buf + m_head->m_head;}byte * ByteQueue::CreatePutSpace(unsigned int &size){	if (m_lazyLength > 0)		FinalizeLazyPut();	if (m_tail->m_tail == m_tail->MaxSize())	{		m_tail->next = new ByteQueueNode(size < m_nodeSize ? m_nodeSize : STDMAX(m_nodeSize, 1024U));		m_tail = m_tail->next;	}	size = m_tail->MaxSize() - m_tail->m_tail;	return m_tail->buf + m_tail->m_tail;}ByteQueue & ByteQueue::operator=(const ByteQueue &rhs){	Destroy();	CopyFrom(rhs);	return *this;}bool ByteQueue::operator==(const ByteQueue &rhs) const{	const unsigned long currentSize = CurrentSize();	if (currentSize != rhs.CurrentSize())		return false;	Walker walker1(*this), walker2(rhs);	byte b1, b2;	while (walker1.Get(b1) && walker2.Get(b2))		if (b1 != b2)			return false;	return true;}byte ByteQueue::operator[](unsigned long i) const{	for (ByteQueueNode *current=m_head; current; current=current->next)	{		if (i < current->CurrentSize())			return (*current)[i];				i -= current->CurrentSize();	}	assert(i < m_lazyLength);	return m_lazyString[i];}void ByteQueue::swap(ByteQueue &rhs){	std::swap(m_nodeSize, rhs.m_nodeSize);	std::swap(m_head, rhs.m_head);	std::swap(m_tail, rhs.m_tail);	std::swap(m_lazyString, rhs.m_lazyString);	std::swap(m_lazyLength, rhs.m_lazyLength);}// ********************************************************void ByteQueue::Walker::IsolatedInitialize(const NameValuePairs &parameters){	m_node = m_queue.m_head;	m_position = 0;	m_offset = 0;	m_lazyString = m_queue.m_lazyString;	m_lazyLength = m_queue.m_lazyLength;}unsigned int ByteQueue::Walker::Get(byte &outByte){	ArraySink sink(&outByte, 1);	return TransferTo(sink, 1);}unsigned int ByteQueue::Walker::Get(byte *outString, unsigned int getMax){	ArraySink sink(outString, getMax);	return TransferTo(sink, getMax);}unsigned int ByteQueue::Walker::Peek(byte &outByte) const{	ArraySink sink(&outByte, 1);	return CopyTo(sink, 1);}unsigned int ByteQueue::Walker::Peek(byte *outString, unsigned int peekMax) const{	ArraySink sink(outString, peekMax);	return CopyTo(sink, peekMax);}unsigned int ByteQueue::Walker::TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel, bool blocking){	unsigned long bytesLeft = transferBytes;	unsigned int blockedBytes = 0;	while (m_node)	{		unsigned int len = STDMIN(bytesLeft, (unsigned long)m_node->CurrentSize()-m_offset);		blockedBytes = target.ChannelPut2(channel, m_node->buf+m_node->m_head+m_offset, len, 0, blocking);		if (blockedBytes)			goto done;		m_position += len;		bytesLeft -= len;		if (!bytesLeft)		{			m_offset += len;			goto done;		}		m_node = m_node->next;		m_offset = 0;	}	if (bytesLeft && m_lazyLength)	{		unsigned int len = (unsigned int)STDMIN(bytesLeft, (unsigned long)m_lazyLength);		unsigned int blockedBytes = target.ChannelPut2(channel, m_lazyString, len, 0, blocking);		if (blockedBytes)			goto done;		m_lazyString += len;		m_lazyLength -= len;		bytesLeft -= len;	}done:	transferBytes -= bytesLeft;	return blockedBytes;}unsigned int ByteQueue::Walker::CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end, const std::string &channel, bool blocking) const{	Walker walker(*this);	walker.Skip(begin);	unsigned long transferBytes = end-begin;	unsigned int blockedBytes = walker.TransferTo2(target, transferBytes, channel, blocking);	begin += transferBytes;	return blockedBytes;}NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av电影免费观看高清完整版在线观看| 久久精品av麻豆的观看方式| 日韩电影在线免费| 国产1区2区3区精品美女| 欧美丝袜第三区| 国产精品嫩草影院com| 日韩电影在线观看电影| 99re这里都是精品| 久久九九全国免费| 天堂蜜桃一区二区三区 | 欧美色中文字幕| 国产欧美中文在线| 另类小说欧美激情| 欧美日韩精品一区二区三区蜜桃| 国产欧美日本一区视频| 韩日av一区二区| 欧美电影在线免费观看| 亚洲综合精品久久| 色诱视频网站一区| 亚洲乱码精品一二三四区日韩在线| 久久国产精品99精品国产| 欧美色精品在线视频| 日韩电影在线一区| 欧美无人高清视频在线观看| 中文字幕中文在线不卡住| 国产精品主播直播| 日韩精品一区二区三区中文精品 | 欧美日韩一区视频| 亚洲免费三区一区二区| av一本久道久久综合久久鬼色| 国产欧美日韩在线视频| 国产一区二区三区最好精华液| 日韩视频永久免费| 免费高清视频精品| 精品久久久久久亚洲综合网 | 亚洲黄色片在线观看| 99久久国产综合色|国产精品| 欧美国产欧美综合| 成人性生交大合| 中文字幕欧美国产| 99国产精品视频免费观看| 国产欧美日韩三区| 91亚洲国产成人精品一区二区三| 中文字幕色av一区二区三区| 91丨九色porny丨蝌蚪| 亚洲欧洲制服丝袜| 欧美日韩国产在线观看| 免费在线看一区| 国产三区在线成人av| 不卡一区中文字幕| 亚洲在线视频网站| 3d动漫精品啪啪| 青青青爽久久午夜综合久久午夜| 日韩欧美国产系列| 国产69精品久久久久777| 亚洲女人****多毛耸耸8| 欧美天堂一区二区三区| 久久国产精品99久久久久久老狼 | 欧美一级电影网站| 国产福利一区二区三区在线视频| 中文字幕+乱码+中文字幕一区| 99re成人精品视频| 偷拍一区二区三区四区| 久久伊99综合婷婷久久伊| www.亚洲人| 免费美女久久99| 中文字幕制服丝袜成人av | 午夜精品国产更新| 久久久国产午夜精品| 色综合久久中文字幕| 精品中文字幕一区二区小辣椒| 亚洲韩国精品一区| 精品1区2区在线观看| 日本高清成人免费播放| 国产一区高清在线| 亚洲成人一区二区在线观看| 精品久久久久久无| 欧洲一区二区三区在线| 国产乱码精品一区二区三| 亚洲妇女屁股眼交7| 久久蜜桃一区二区| 6080日韩午夜伦伦午夜伦| 成人毛片在线观看| 美女爽到高潮91| 亚洲精品高清视频在线观看| 欧美精品一区二区三区蜜臀| 欧美主播一区二区三区美女| 国产一区二区免费在线| 午夜国产精品一区| 亚洲日本在线a| 26uuu亚洲综合色欧美| 欧美日韩在线播放一区| 成人看片黄a免费看在线| 另类的小说在线视频另类成人小视频在线| 中文字幕色av一区二区三区| 久久人人爽人人爽| 日韩一区二区在线看| 在线精品国精品国产尤物884a| 成人午夜激情在线| 激情六月婷婷久久| 久久er精品视频| 天堂在线亚洲视频| 亚洲gay无套男同| 亚洲精品免费一二三区| 国产精品久久久久桃色tv| 久久久综合视频| 精品久久久久久久一区二区蜜臀| 欧美亚洲综合久久| 色欧美片视频在线观看| av中文字幕一区| 99久久99久久久精品齐齐| 成人h动漫精品| aa级大片欧美| av在线综合网| 91理论电影在线观看| 本田岬高潮一区二区三区| 国产成人啪午夜精品网站男同| 久久不见久久见中文字幕免费| 日本不卡免费在线视频| 日本一区中文字幕 | 洋洋成人永久网站入口| 亚洲免费观看高清完整版在线观看| 中文无字幕一区二区三区| 国产女主播在线一区二区| 中国色在线观看另类| 亚洲欧洲日韩在线| 亚洲精品视频一区| 亚洲制服欧美中文字幕中文字幕| 亚洲电影在线播放| 日韩国产高清在线| 狠狠色丁香九九婷婷综合五月| 国产盗摄一区二区| 91免费国产在线| 欧美三级三级三级| 欧美一区二区私人影院日本| 欧美一区二区三区成人| 国产亚洲一二三区| 中文字幕一区二区三区色视频| 亚洲男人电影天堂| 日韩成人一级片| 国产精品99久久久| 色成年激情久久综合| 欧美日本在线视频| 久久综合久久综合亚洲| 国产精品你懂的在线| 亚洲成人综合在线| 国产成人在线视频免费播放| 99re66热这里只有精品3直播| 欧美亚洲高清一区二区三区不卡| 欧美一区二区三区免费在线看| 久久综合九色综合欧美亚洲| 国产精品全国免费观看高清 | 国产精品久久久久久亚洲毛片| 一区二区三区四区亚洲| 精品一区二区精品| 99视频有精品| 日韩欧美综合一区| 亚洲日本青草视频在线怡红院| 日日夜夜免费精品| youjizz久久| 欧美变态tickle挠乳网站| 国产精品国产自产拍在线| 日本午夜一本久久久综合| 成人国产电影网| 欧美一三区三区四区免费在线看| 亚洲国产高清在线观看视频| 日韩成人精品在线| 91国产精品成人| 久久精品视频一区二区三区| 亚洲国产成人高清精品| 国产精品中文欧美| 日韩精品一区二区三区蜜臀| 一区二区高清免费观看影视大全| 国产美女久久久久| 91麻豆精品国产91久久久| 1区2区3区精品视频| 国产精品一区二区三区网站| 在线不卡中文字幕| 亚洲黄色片在线观看| www.色综合.com| 国产网站一区二区三区| 老汉av免费一区二区三区| 在线观看国产日韩| 亚洲精品日韩一| 99精品欧美一区二区三区小说 | 亚洲亚洲人成综合网络| 成人一区二区三区视频| 精品国产免费一区二区三区香蕉| 亚洲国产va精品久久久不卡综合| 99九九99九九九视频精品| 中文字幕久久午夜不卡| 国产精品一区二区果冻传媒| 日韩亚洲欧美高清| 日韩va欧美va亚洲va久久| 欧美日韩国产中文| 偷窥国产亚洲免费视频| 欧美日本韩国一区二区三区视频| 亚洲线精品一区二区三区八戒| 色婷婷精品久久二区二区蜜臀av| 国产精品美女久久久久久久|