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

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

?? misc.h

?? 此壓縮包內有cast、blowfish、simple、des、cryptlib、rsa、mqueue、xtrcrypt、gf256、base32,base64、modexppc、network等一些的
?? H
?? 第 1 頁 / 共 2 頁
字號:
#ifndef CRYPTOPP_MISC_H
#define CRYPTOPP_MISC_H

#include "cryptlib.h"
#include "smartptr.h"
#include <string.h>		// for memcpy and memmove

#ifdef _MSC_VER
	#include <stdlib.h>
	#if _MSC_VER >= 1400
		// VC2005 workaround: disable declarations that conflict with winnt.h
		#define _interlockedbittestandset CRYPTOPP_DISABLED_INTRINSIC_1
		#define _interlockedbittestandreset CRYPTOPP_DISABLED_INTRINSIC_2
		#include <intrin.h>
		#undef _interlockedbittestandset
		#undef _interlockedbittestandreset
		#define CRYPTOPP_FAST_ROTATE(x) 1
	#elif _MSC_VER >= 1300
		#define CRYPTOPP_FAST_ROTATE(x) ((x) == 32 | (x) == 64)
	#else
		#define CRYPTOPP_FAST_ROTATE(x) ((x) == 32)
	#endif
#elif (defined(__MWERKS__) && TARGET_CPU_PPC) || \
	(defined(__GNUC__) && (defined(_ARCH_PWR2) || defined(_ARCH_PWR) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_ARCH_COM)))
	#define CRYPTOPP_FAST_ROTATE(x) ((x) == 32)
#elif defined(__GNUC__) && (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86)	// depend on GCC's peephole optimization to generate rotate instructions
	#define CRYPTOPP_FAST_ROTATE(x) 1
#else
	#define CRYPTOPP_FAST_ROTATE(x) 0
#endif

#ifdef __BORLANDC__
#include <mem.h>
#endif

#if defined(__GNUC__) && defined(__linux__)
#define CRYPTOPP_BYTESWAP_AVAILABLE
#include <byteswap.h>
#endif

NAMESPACE_BEGIN(CryptoPP)

// ************** compile-time assertion ***************

template <bool b>
struct CompileAssert
{
	static char dummy[2*b-1];
};

#define CRYPTOPP_COMPILE_ASSERT(assertion) CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, __LINE__)
#if defined(CRYPTOPP_EXPORTS) || defined(CRYPTOPP_IMPORTS)
#define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance)
#else
#define CRYPTOPP_COMPILE_ASSERT_INSTANCE(assertion, instance) static CompileAssert<(assertion)> CRYPTOPP_ASSERT_JOIN(cryptopp_assert_, instance)
#endif
#define CRYPTOPP_ASSERT_JOIN(X, Y) CRYPTOPP_DO_ASSERT_JOIN(X, Y)
#define CRYPTOPP_DO_ASSERT_JOIN(X, Y) X##Y

// ************** misc classes ***************

class CRYPTOPP_DLL Empty
{
};

//! _
template <class BASE1, class BASE2>
class CRYPTOPP_NO_VTABLE TwoBases : public BASE1, public BASE2
{
};

//! _
template <class BASE1, class BASE2, class BASE3>
class CRYPTOPP_NO_VTABLE ThreeBases : public BASE1, public BASE2, public BASE3
{
};

template <class T>
class ObjectHolder
{
protected:
	T m_object;
};

class NotCopyable
{
public:
	NotCopyable() {}
private:
    NotCopyable(const NotCopyable &);
    void operator=(const NotCopyable &);
};

template <class T>
struct NewObject
{
	T* operator()() const {return new T;}
};

/*! This function safely initializes a static object in a multithreaded environment without using locks.
	It may leak memory when two threads try to initialize the static object at the same time
	but this should be acceptable since each static object is only initialized once per session.
*/
template <class T, class F = NewObject<T>, int instance=0>
class Singleton
{
public:
	Singleton(F objectFactory = F()) : m_objectFactory(objectFactory) {}

	// prevent this function from being inlined
	CRYPTOPP_NOINLINE const T & Ref(CRYPTOPP_NOINLINE_DOTDOTDOT) const;

private:
	F m_objectFactory;
};

template <class T, class F, int instance>
const T & Singleton<T, F, instance>::Ref(CRYPTOPP_NOINLINE_DOTDOTDOT) const
{
	static simple_ptr<T> s_pObject;
	static char s_objectState = 0;

retry:
	switch (s_objectState)
	{
	case 0:
		s_objectState = 1;
		try
		{
			s_pObject.m_p = m_objectFactory();
		}
		catch(...)
		{
			s_objectState = 0;
			throw;
		}
		s_objectState = 2;
		break;
	case 1:
		goto retry;
	default:
		break;
	}
	return *s_pObject.m_p;
}

// ************** misc functions ***************

#if (!__STDC_WANT_SECURE_LIB__)
inline void memcpy_s(void *dest, size_t sizeInBytes, const void *src, size_t count)
{
	if (count > sizeInBytes)
		throw InvalidArgument("memcpy_s: buffer overflow");
	memcpy(dest, src, count);
}

inline void memmove_s(void *dest, size_t sizeInBytes, const void *src, size_t count)
{
	if (count > sizeInBytes)
		throw InvalidArgument("memmove_s: buffer overflow");
	memmove(dest, src, count);
}
#endif

// can't use std::min or std::max in MSVC60 or Cygwin 1.1.0
template <class T> inline const T& STDMIN(const T& a, const T& b)
{
	return b < a ? b : a;
}

template <class T1, class T2> inline const T1 UnsignedMin(const T1& a, const T2& b)
{
	CRYPTOPP_COMPILE_ASSERT((sizeof(T1)<=sizeof(T2) && T2(-1)>0) || (sizeof(T1)>sizeof(T2) && T1(-1)>0));
	assert(a==0 || a>0);	// GCC workaround: get rid of the warning "comparison is always true due to limited range of data type"
	assert(b>=0);

	if (sizeof(T1)<=sizeof(T2))
		return b < (T2)a ? (T1)b : a;
	else
		return (T1)b < a ? (T1)b : a;
}

template <class T> inline const T& STDMAX(const T& a, const T& b)
{
	return a < b ? b : a;
}

#define RETURN_IF_NONZERO(x) size_t returnedValue = x; if (returnedValue) return returnedValue

// this version of the macro is fastest on Pentium 3 and Pentium 4 with MSVC 6 SP5 w/ Processor Pack
#define GETBYTE(x, y) (unsigned int)byte((x)>>(8*(y)))
// these may be faster on other CPUs/compilers
// #define GETBYTE(x, y) (unsigned int)(((x)>>(8*(y)))&255)
// #define GETBYTE(x, y) (((byte *)&(x))[y])

#define CRYPTOPP_GET_BYTE_AS_BYTE(x, y) byte((x)>>(8*(y)))

template <class T>
unsigned int Parity(T value)
{
	for (unsigned int i=8*sizeof(value)/2; i>0; i/=2)
		value ^= value >> i;
	return (unsigned int)value&1;
}

template <class T>
unsigned int BytePrecision(const T &value)
{
	if (!value)
		return 0;

	unsigned int l=0, h=8*sizeof(value);

	while (h-l > 8)
	{
		unsigned int t = (l+h)/2;
		if (value >> t)
			l = t;
		else
			h = t;
	}

	return h/8;
}

template <class T>
unsigned int BitPrecision(const T &value)
{
	if (!value)
		return 0;

	unsigned int l=0, h=8*sizeof(value);

	while (h-l > 1)
	{
		unsigned int t = (l+h)/2;
		if (value >> t)
			l = t;
		else
			h = t;
	}

	return h;
}

template <class T>
inline T Crop(T value, size_t size)
{
	if (size < 8*sizeof(value))
    	return T(value & ((T(1) << size) - 1));
	else
		return value;
}

template <class T1, class T2>
inline bool SafeConvert(T1 from, T2 &to)
{
	to = (T2)from;
	if (from != to || (from > 0) != (to > 0))
		return false;
	return true;
}

inline size_t BitsToBytes(size_t bitCount)
{
	return ((bitCount+7)/(8));
}

inline size_t BytesToWords(size_t byteCount)
{
	return ((byteCount+WORD_SIZE-1)/WORD_SIZE);
}

inline size_t BitsToWords(size_t bitCount)
{
	return ((bitCount+WORD_BITS-1)/(WORD_BITS));
}

inline size_t BitsToDwords(size_t bitCount)
{
	return ((bitCount+2*WORD_BITS-1)/(2*WORD_BITS));
}

CRYPTOPP_DLL void CRYPTOPP_API xorbuf(byte *buf, const byte *mask, size_t count);
CRYPTOPP_DLL void CRYPTOPP_API xorbuf(byte *output, const byte *input, const byte *mask, size_t count);

template <class T>
inline bool IsPowerOf2(const T &n)
{
	return n > 0 && (n & (n-1)) == 0;
}

template <class T1, class T2>
inline T2 ModPowerOf2(const T1 &a, const T2 &b)
{
	assert(IsPowerOf2(b));
	return T2(a) & (b-1);
}

template <class T1, class T2>
inline T1 RoundDownToMultipleOf(const T1 &n, const T2 &m)
{
	if (IsPowerOf2(m))
		return n - ModPowerOf2(n, m);
	else
		return n - n%m;
}

template <class T1, class T2>
inline T1 RoundUpToMultipleOf(const T1 &n, const T2 &m)
{
	if (n+m-1 < n)
		throw InvalidArgument("RoundUpToMultipleOf: integer overflow");
	return RoundDownToMultipleOf(n+m-1, m);
}

template <class T>
inline unsigned int GetAlignmentOf(T *dummy=NULL)	// VC60 workaround
{
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86
	if (sizeof(T) < 16)
		return 1;			// alignment not needed on x86 and x64
#endif

#if (_MSC_VER >= 1300)
	return __alignof(T);
#elif defined(__GNUC__)
	return __alignof__(T);
#elif defined(CRYPTOPP_SLOW_WORD64)
	return UnsignedMin(4U, sizeof(T));
#else
	return sizeof(T);
#endif
}

inline bool IsAlignedOn(const void *p, unsigned int alignment)
{
	return alignment==1 || (IsPowerOf2(alignment) ? ModPowerOf2((size_t)p, alignment) == 0 : (size_t)p % alignment == 0);
}

template <class T>
inline bool IsAligned(const void *p, T *dummy=NULL)	// VC60 workaround
{
	return IsAlignedOn(p, GetAlignmentOf<T>());
}

#ifdef IS_LITTLE_ENDIAN
	typedef LittleEndian NativeByteOrder;
#else
	typedef BigEndian NativeByteOrder;
#endif

inline ByteOrder GetNativeByteOrder()
{
	return NativeByteOrder::ToEnum();
}

inline bool NativeByteOrderIs(ByteOrder order)
{
	return order == GetNativeByteOrder();
}

template <class T>
std::string IntToString(T a, unsigned int base = 10)
{
	if (a == 0)
		return "0";
	bool negate = false;
	if (a < 0)
	{
		negate = true;
		a = 0-a;	// VC .NET does not like -a
	}
	std::string result;
	while (a > 0)
	{
		T digit = a % base;
		result = char((digit < 10 ? '0' : ('a' - 10)) + digit) + result;
		a /= base;
	}
	if (negate)
		result = "-" + result;
	return result;
}

template <class T1, class T2>
inline T1 SaturatingSubtract(const T1 &a, const T2 &b)
{
	return T1((a > b) ? (a - b) : 0);
}

template <class T>
inline CipherDir GetCipherDir(const T &obj)
{
	return obj.IsForwardTransformation() ? ENCRYPTION : DECRYPTION;
}

CRYPTOPP_DLL void CRYPTOPP_API CallNewHandler();

inline void IncrementCounterByOne(byte *inout, unsigned int s)
{
	for (int i=s-1, carry=1; i>=0 && carry; i--)
		carry = !++inout[i];
}

inline void IncrementCounterByOne(byte *output, const byte *input, unsigned int s)
{
	int i, carry;
	for (i=s-1, carry=1; i>=0 && carry; i--)
		carry = ((output[i] = input[i]+1) == 0);
	memcpy_s(output, s, input, i+1);
}

// ************** rotate functions ***************

template <class T> inline T rotlFixed(T x, unsigned int y)
{
	assert(y < sizeof(T)*8);
	return T((x<<y) | (x>>(sizeof(T)*8-y)));
}

template <class T> inline T rotrFixed(T x, unsigned int y)
{
	assert(y < sizeof(T)*8);
	return T((x>>y) | (x<<(sizeof(T)*8-y)));
}

template <class T> inline T rotlVariable(T x, unsigned int y)
{
	assert(y < sizeof(T)*8);
	return T((x<<y) | (x>>(sizeof(T)*8-y)));
}

template <class T> inline T rotrVariable(T x, unsigned int y)
{
	assert(y < sizeof(T)*8);
	return T((x>>y) | (x<<(sizeof(T)*8-y)));
}

template <class T> inline T rotlMod(T x, unsigned int y)
{
	y %= sizeof(T)*8;
	return T((x<<y) | (x>>(sizeof(T)*8-y)));
}

template <class T> inline T rotrMod(T x, unsigned int y)
{
	y %= sizeof(T)*8;
	return T((x>>y) | (x<<(sizeof(T)*8-y)));
}

#ifdef _MSC_VER

template<> inline word32 rotlFixed<word32>(word32 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return y ? _lrotl(x, y) : x;
}

template<> inline word32 rotrFixed<word32>(word32 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return y ? _lrotr(x, y) : x;
}

template<> inline word32 rotlVariable<word32>(word32 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return _lrotl(x, y);
}

template<> inline word32 rotrVariable<word32>(word32 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return _lrotr(x, y);
}

template<> inline word32 rotlMod<word32>(word32 x, unsigned int y)
{
	return _lrotl(x, y);
}

template<> inline word32 rotrMod<word32>(word32 x, unsigned int y)
{
	return _lrotr(x, y);
}

#endif // #ifdef _MSC_VER

#if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
// Intel C++ Compiler 10.0 calls a function instead of using the rotate instruction when using these instructions

template<> inline word64 rotlFixed<word64>(word64 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return y ? _rotl64(x, y) : x;
}

template<> inline word64 rotrFixed<word64>(word64 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return y ? _rotr64(x, y) : x;
}

template<> inline word64 rotlVariable<word64>(word64 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return _rotl64(x, y);
}

template<> inline word64 rotrVariable<word64>(word64 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return _rotr64(x, y);
}

template<> inline word64 rotlMod<word64>(word64 x, unsigned int y)
{
	return _rotl64(x, y);
}

template<> inline word64 rotrMod<word64>(word64 x, unsigned int y)
{
	return _rotr64(x, y);
}

#endif // #if _MSC_VER >= 1310

#if _MSC_VER >= 1400 && !defined(__INTEL_COMPILER)
// Intel C++ Compiler 10.0 gives undefined externals with these

template<> inline word16 rotlFixed<word16>(word16 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return y ? _rotl16(x, y) : x;
}

template<> inline word16 rotrFixed<word16>(word16 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return y ? _rotr16(x, y) : x;
}

template<> inline word16 rotlVariable<word16>(word16 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return _rotl16(x, y);
}

template<> inline word16 rotrVariable<word16>(word16 x, unsigned int y)
{
	assert(y < 8*sizeof(x));
	return _rotr16(x, y);
}

template<> inline word16 rotlMod<word16>(word16 x, unsigned int y)
{
	return _rotl16(x, y);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人一级电影| 欧美一级高清大全免费观看| 99精品视频在线免费观看| 在线播放亚洲一区| 中文字幕在线不卡| 国产麻豆日韩欧美久久| 欧美天堂亚洲电影院在线播放| 国产午夜精品久久久久久免费视| 婷婷夜色潮精品综合在线| 99久久国产综合精品麻豆| 亚洲精品一区二区三区精华液| 亚洲国产精品久久艾草纯爱| 成人福利视频在线| 久久精品欧美一区二区三区不卡| 午夜精品在线看| 在线视频国产一区| 亚洲欧美日韩一区二区| 懂色av中文一区二区三区| 精品国产露脸精彩对白| 免费人成在线不卡| 制服丝袜亚洲色图| 日韩av电影天堂| 8v天堂国产在线一区二区| 香蕉乱码成人久久天堂爱免费| 欧洲一区二区三区在线| 亚洲一区成人在线| 色婷婷亚洲综合| 亚洲综合一区二区精品导航| 色综合色综合色综合色综合色综合 | 99久久久国产精品免费蜜臀| 精品精品国产高清一毛片一天堂| 日本不卡不码高清免费观看 | 国产成人久久精品77777最新版本| 91精品国产乱码| 免费在线视频一区| 精品国产乱码久久久久久闺蜜| 视频在线观看一区| 欧美成人精品3d动漫h| 精品系列免费在线观看| 精品理论电影在线观看 | 欧美一区二区免费| 日本不卡123| 2014亚洲片线观看视频免费| 国产米奇在线777精品观看| 久久亚洲一级片| 成人动漫一区二区在线| 亚洲免费观看高清完整版在线观看| 93久久精品日日躁夜夜躁欧美| 亚洲三级久久久| 欧美日韩一区高清| 久久草av在线| 欧美激情一区在线观看| 日本道精品一区二区三区| 亚洲国产精品久久人人爱| 日韩一区二区电影网| 国产精品一区二区不卡| 亚洲欧美日韩国产另类专区| 欧美日韩国产首页| 精品一区二区三区欧美| 国产精品久久毛片| 欧美手机在线视频| 国产一区不卡视频| 亚洲国产欧美另类丝袜| 欧美精品一区二区不卡| 99精品欧美一区二区蜜桃免费| 丝袜亚洲另类欧美综合| 日本一区二区三级电影在线观看 | 亚洲人被黑人高潮完整版| 精品视频一区三区九区| 国产一区二区在线影院| 一区二区三区久久久| 精品国产伦一区二区三区免费| av激情亚洲男人天堂| 开心九九激情九九欧美日韩精美视频电影| 久久色.com| 91麻豆精品国产自产在线 | 欧美成人a∨高清免费观看| 成人午夜免费视频| 免费在线欧美视频| 夜夜操天天操亚洲| 国产欧美日韩不卡| 日韩欧美国产一二三区| 色婷婷综合久久久中文一区二区 | 欧美成人国产一区二区| 色94色欧美sute亚洲13| 风流少妇一区二区| 麻豆精品视频在线观看| 亚洲自拍偷拍九九九| 亚洲国产精品传媒在线观看| 久久免费美女视频| 欧美精品亚洲一区二区在线播放| 成人h精品动漫一区二区三区| 奇米一区二区三区| 香蕉成人伊视频在线观看| 自拍偷拍欧美精品| 亚洲国产精品成人综合| 精品伦理精品一区| 日韩一区二区三区免费观看| 欧美在线观看一二区| 91免费在线播放| 99久久精品免费| 成人av网站免费观看| 国产精品99久久久久久似苏梦涵| 青青草国产精品亚洲专区无| 亚洲v精品v日韩v欧美v专区| 亚洲网友自拍偷拍| 一区二区三区影院| 樱花影视一区二区| 一区二区三区中文字幕电影| 最新国产成人在线观看| 中文字幕在线一区免费| 国产精品电影一区二区三区| 国产精品视频麻豆| 中文字幕在线一区免费| 亚洲人亚洲人成电影网站色| 国产精品久久久久久久第一福利 | 国产九色sp调教91| 国产老肥熟一区二区三区| 国产原创一区二区三区| 国产在线观看一区二区| 国产成人午夜片在线观看高清观看| 国产一区三区三区| 粉嫩13p一区二区三区| gogo大胆日本视频一区| 91蝌蚪国产九色| 欧美日韩亚洲综合在线| 日韩三级视频在线观看| 久久无码av三级| 国产精品久久毛片a| 亚洲伊人伊色伊影伊综合网| 亚洲成人av电影| 另类综合日韩欧美亚洲| 国产999精品久久久久久绿帽| av亚洲精华国产精华精| 欧美日韩在线不卡| 26uuu成人网一区二区三区| 国产精品久久久久久久久果冻传媒| 中文字幕高清不卡| 一区二区三区成人在线视频| 琪琪久久久久日韩精品| 国产成人av电影| 欧美影院午夜播放| 日韩欧美国产1| 国产精品成人一区二区艾草| 亚洲国产美女搞黄色| 国产福利视频一区二区三区| 91麻豆精品秘密| 日韩欧美的一区| 日韩理论片网站| 亚洲一区中文日韩| 国产精品一区专区| 欧美午夜电影在线播放| 久久夜色精品国产噜噜av| 亚洲黄色片在线观看| 国产综合色视频| 欧美性视频一区二区三区| 久久综合色8888| 亚洲一区二区三区四区五区黄| 麻豆国产91在线播放| 日本电影欧美片| 国产精品素人一区二区| 午夜精品爽啪视频| 成人美女视频在线观看18| 欧美一区二区福利视频| 亚洲欧美一区二区三区孕妇| 黄网站免费久久| 在线不卡中文字幕播放| 亚洲欧美日韩一区| 粉嫩一区二区三区性色av| 欧美一区二区视频观看视频| 亚洲乱码日产精品bd| 成人精品视频一区二区三区| 日韩精品影音先锋| 婷婷开心激情综合| 色婷婷激情综合| 国产目拍亚洲精品99久久精品 | 一区二区三区欧美视频| 国产精品18久久久久久vr| 欧美一区二区成人| 亚洲福中文字幕伊人影院| 91影院在线观看| 国产精品伦一区| 国产毛片精品国产一区二区三区| 欧美亚日韩国产aⅴ精品中极品| 中文无字幕一区二区三区| 国产麻豆91精品| www成人在线观看| 麻豆精品视频在线观看免费| 欧美日韩一区二区在线视频| 一区二区三区波多野结衣在线观看| 成人听书哪个软件好| 国产清纯在线一区二区www| 久久不见久久见免费视频1| 欧美精品日韩一本| 亚洲成a人片综合在线| 欧美性生活久久| 亚洲成精国产精品女| 在线播放中文一区| 免费三级欧美电影| 精品美女一区二区三区|