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

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

?? integer.h

?? 研讀AxCrypt對加解密的處理方法
?? H
字號:
#ifndef CRYPTOPP_INTEGER_H
#define CRYPTOPP_INTEGER_H

/** \file */

#include "cryptlib.h"
#include "secblock.h"

#include <iosfwd>
#include <algorithm>

#ifdef CRYPTOPP_X86ASM_AVAILABLE

#ifdef _M_IX86
	#if (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 500)) || (defined(__ICL) && (__ICL >= 500))
		#define SSE2_INTRINSICS_AVAILABLE
		#define CRYPTOPP_MM_MALLOC_AVAILABLE
	#elif defined(_MSC_VER)
		// _mm_free seems to be the only way to tell if the Processor Pack is installed or not
		#include <malloc.h>
		#if defined(_mm_free)
			#define SSE2_INTRINSICS_AVAILABLE
			#define CRYPTOPP_MM_MALLOC_AVAILABLE
		#endif
	#endif
#endif

// SSE2 intrinsics work in GCC 3.3 or later
#if defined(__SSE2__) && (__GNUC_MAJOR__ > 3 || __GNUC_MINOR__ > 2)
	#define SSE2_INTRINSICS_AVAILABLE
#endif

#endif

NAMESPACE_BEGIN(CryptoPP)

#if defined(SSE2_INTRINSICS_AVAILABLE)
	template <class T>
	class AlignedAllocator : public AllocatorBase<T>
	{
	public:
		CRYPTOPP_INHERIT_ALLOCATOR_TYPES

		pointer allocate(size_type n, const void *);
		void deallocate(void *p, size_type n);
		pointer reallocate(T *p, size_type oldSize, size_type newSize, bool preserve)
		{
			return StandardReallocate(*this, p, oldSize, newSize, preserve);
		}

	#if !(defined(CRYPTOPP_MALLOC_ALIGNMENT_IS_16) || defined(CRYPTOPP_MEMALIGN_AVAILABLE) || defined(CRYPTOPP_MM_MALLOC_AVAILABLE))
	#define CRYPTOPP_NO_ALIGNED_ALLOC
		AlignedAllocator() : m_pBlock(NULL) {}
	protected:
		void *m_pBlock;
	#endif
	};

	template class CRYPTOPP_DLL AlignedAllocator<word>;
	typedef SecBlock<word, AlignedAllocator<word> > SecAlignedWordBlock;
#else
	typedef SecWordBlock SecAlignedWordBlock;
#endif

void CRYPTOPP_DLL DisableSSE2();

//! multiple precision integer and basic arithmetics
/*! This class can represent positive and negative integers
	with absolute value less than (256**sizeof(word)) ** (256**sizeof(int)).
	\nosubgrouping
*/
class CRYPTOPP_DLL Integer : public ASN1Object
{
public:
	//! \name ENUMS, EXCEPTIONS, and TYPEDEFS
	//@{
		//! division by zero exception
		class DivideByZero : public Exception
		{
		public:
			DivideByZero() : Exception(OTHER_ERROR, "Integer: division by zero") {}
		};

		//!
		class RandomNumberNotFound : public Exception
		{
		public:
			RandomNumberNotFound() : Exception(OTHER_ERROR, "Integer: no integer satisfies the given parameters") {}
		};

		//!
		enum Sign {POSITIVE=0, NEGATIVE=1};

		//!
		enum Signedness {
		//!
			UNSIGNED,
		//!
			SIGNED};

		//!
		enum RandomNumberType {
		//!
			ANY,
		//!
			PRIME};
	//@}

	//! \name CREATORS
	//@{
		//! creates the zero integer
		Integer();

		//! copy constructor
		Integer(const Integer& t);

		//! convert from signed long
		Integer(signed long value);

		//! convert from lword
		Integer(Sign s, lword value);

		//! convert from two words
		Integer(Sign s, word highWord, word lowWord);

		//! convert from string
		/*! str can be in base 2, 8, 10, or 16.  Base is determined by a
			case insensitive suffix of 'h', 'o', or 'b'.  No suffix means base 10.
		*/
		explicit Integer(const char *str);
		explicit Integer(const wchar_t *str);

		//! convert from big-endian byte array
		Integer(const byte *encodedInteger, unsigned int byteCount, Signedness s=UNSIGNED);

		//! convert from big-endian form stored in a BufferedTransformation
		Integer(BufferedTransformation &bt, unsigned int byteCount, Signedness s=UNSIGNED);

		//! convert from BER encoded byte array stored in a BufferedTransformation object
		explicit Integer(BufferedTransformation &bt);

		//! create a random integer
		/*! The random integer created is uniformly distributed over [0, 2**bitcount). */
		Integer(RandomNumberGenerator &rng, unsigned int bitcount);

		//! avoid calling constructors for these frequently used integers
		static const Integer &Zero();
		//! avoid calling constructors for these frequently used integers
		static const Integer &One();
		//! avoid calling constructors for these frequently used integers
		static const Integer &Two();

		//! create a random integer of special type
		/*! Ideally, the random integer created should be uniformly distributed
			over {x | min <= x <= max and x is of rnType and x % mod == equiv}.
			However the actual distribution may not be uniform because sequential
			search is used to find an appropriate number from a random starting
			point.
			May return (with very small probability) a pseudoprime when a prime
			is requested and max > lastSmallPrime*lastSmallPrime (lastSmallPrime
			is declared in nbtheory.h).
			\throw RandomNumberNotFound if the set is empty.
		*/
		Integer(RandomNumberGenerator &rng, const Integer &min, const Integer &max, RandomNumberType rnType=ANY, const Integer &equiv=Zero(), const Integer &mod=One());

		//! return the integer 2**e
		static Integer Power2(unsigned int e);
	//@}

	//! \name ENCODE/DECODE
	//@{
		//! minimum number of bytes to encode this integer
		/*! MinEncodedSize of 0 is 1 */
		unsigned int MinEncodedSize(Signedness=UNSIGNED) const;
		//! encode in big-endian format
		/*! unsigned means encode absolute value, signed means encode two's complement if negative.
			if outputLen < MinEncodedSize, the most significant bytes will be dropped
			if outputLen > MinEncodedSize, the most significant bytes will be padded
		*/
		unsigned int Encode(byte *output, unsigned int outputLen, Signedness=UNSIGNED) const;
		//!
		unsigned int Encode(BufferedTransformation &bt, unsigned int outputLen, Signedness=UNSIGNED) const;

		//! encode using Distinguished Encoding Rules, put result into a BufferedTransformation object
		void DEREncode(BufferedTransformation &bt) const;

		//! encode absolute value as big-endian octet string
		void DEREncodeAsOctetString(BufferedTransformation &bt, unsigned int length) const;

		//! encode absolute value in OpenPGP format, return length of output
		unsigned int OpenPGPEncode(byte *output, unsigned int bufferSize) const;
		//! encode absolute value in OpenPGP format, put result into a BufferedTransformation object
		unsigned int OpenPGPEncode(BufferedTransformation &bt) const;

		//!
		void Decode(const byte *input, unsigned int inputLen, Signedness=UNSIGNED);
		//! 
		//* Precondition: bt.MaxRetrievable() >= inputLen
		void Decode(BufferedTransformation &bt, unsigned int inputLen, Signedness=UNSIGNED);

		//!
		void BERDecode(const byte *input, unsigned int inputLen);
		//!
		void BERDecode(BufferedTransformation &bt);

		//! decode nonnegative value as big-endian octet string
		void BERDecodeAsOctetString(BufferedTransformation &bt, unsigned int length);

		class OpenPGPDecodeErr : public Exception
		{
		public: 
			OpenPGPDecodeErr() : Exception(INVALID_DATA_FORMAT, "OpenPGP decode error") {}
		};

		//!
		void OpenPGPDecode(const byte *input, unsigned int inputLen);
		//!
		void OpenPGPDecode(BufferedTransformation &bt);
	//@}

	//! \name ACCESSORS
	//@{
		//! return true if *this can be represented as a signed long
		bool IsConvertableToLong() const;
		//! return equivalent signed long if possible, otherwise undefined
		signed long ConvertToLong() const;

		//! number of significant bits = floor(log2(abs(*this))) + 1
		unsigned int BitCount() const;
		//! number of significant bytes = ceiling(BitCount()/8)
		unsigned int ByteCount() const;
		//! number of significant words = ceiling(ByteCount()/sizeof(word))
		unsigned int WordCount() const;

		//! return the i-th bit, i=0 being the least significant bit
		bool GetBit(unsigned int i) const;
		//! return the i-th byte
		byte GetByte(unsigned int i) const;
		//! return n lowest bits of *this >> i
		unsigned long GetBits(unsigned int i, unsigned int n) const;

		//!
		bool IsZero() const {return !*this;}
		//!
		bool NotZero() const {return !IsZero();}
		//!
		bool IsNegative() const {return sign == NEGATIVE;}
		//!
		bool NotNegative() const {return !IsNegative();}
		//!
		bool IsPositive() const {return NotNegative() && NotZero();}
		//!
		bool NotPositive() const {return !IsPositive();}
		//!
		bool IsEven() const {return GetBit(0) == 0;}
		//!
		bool IsOdd() const	{return GetBit(0) == 1;}
	//@}

	//! \name MANIPULATORS
	//@{
		//!
		Integer&  operator=(const Integer& t);

		//!
		Integer&  operator+=(const Integer& t);
		//!
		Integer&  operator-=(const Integer& t);
		//!
		Integer&  operator*=(const Integer& t)	{return *this = Times(t);}
		//!
		Integer&  operator/=(const Integer& t)	{return *this = DividedBy(t);}
		//!
		Integer&  operator%=(const Integer& t)	{return *this = Modulo(t);}
		//!
		Integer&  operator/=(word t)  {return *this = DividedBy(t);}
		//!
		Integer&  operator%=(word t)  {return *this = Modulo(t);}

		//!
		Integer&  operator<<=(unsigned int);
		//!
		Integer&  operator>>=(unsigned int);

		//!
		void Randomize(RandomNumberGenerator &rng, unsigned int bitcount);
		//!
		void Randomize(RandomNumberGenerator &rng, const Integer &min, const Integer &max);
		//! set this Integer to a random element of {x | min <= x <= max and x is of rnType and x % mod == equiv}
		/*! returns false if the set is empty */
		bool Randomize(RandomNumberGenerator &rng, const Integer &min, const Integer &max, RandomNumberType rnType, const Integer &equiv=Zero(), const Integer &mod=One());

		bool GenerateRandomNoThrow(RandomNumberGenerator &rng, const NameValuePairs &params = g_nullNameValuePairs);
		void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &params = g_nullNameValuePairs)
		{
			if (!GenerateRandomNoThrow(rng, params))
				throw RandomNumberNotFound();
		}

		//! set the n-th bit to value
		void SetBit(unsigned int n, bool value=1);
		//! set the n-th byte to value
		void SetByte(unsigned int n, byte value);

		//!
		void Negate();
		//!
		void SetPositive() {sign = POSITIVE;}
		//!
		void SetNegative() {if (!!(*this)) sign = NEGATIVE;}

		//!
		void swap(Integer &a);
	//@}

	//! \name UNARY OPERATORS
	//@{
		//!
		bool		operator!() const;
		//!
		Integer 	operator+() const {return *this;}
		//!
		Integer 	operator-() const;
		//!
		Integer&	operator++();
		//!
		Integer&	operator--();
		//!
		Integer 	operator++(int) {Integer temp = *this; ++*this; return temp;}
		//!
		Integer 	operator--(int) {Integer temp = *this; --*this; return temp;}
	//@}

	//! \name BINARY OPERATORS
	//@{
		//! signed comparison
		/*! \retval -1 if *this < a
			\retval  0 if *this = a
			\retval  1 if *this > a
		*/
		int Compare(const Integer& a) const;

		//!
		Integer Plus(const Integer &b) const;
		//!
		Integer Minus(const Integer &b) const;
		//!
		Integer Times(const Integer &b) const;
		//!
		Integer DividedBy(const Integer &b) const;
		//!
		Integer Modulo(const Integer &b) const;
		//!
		Integer DividedBy(word b) const;
		//!
		word Modulo(word b) const;

		//!
		Integer operator>>(unsigned int n) const	{return Integer(*this)>>=n;}
		//!
		Integer operator<<(unsigned int n) const	{return Integer(*this)<<=n;}
	//@}

	//! \name OTHER ARITHMETIC FUNCTIONS
	//@{
		//!
		Integer AbsoluteValue() const;
		//!
		Integer Doubled() const {return Plus(*this);}
		//!
		Integer Squared() const {return Times(*this);}
		//! extract square root, if negative return 0, else return floor of square root
		Integer SquareRoot() const;
		//! return whether this integer is a perfect square
		bool IsSquare() const;

		//! is 1 or -1
		bool IsUnit() const;
		//! return inverse if 1 or -1, otherwise return 0
		Integer MultiplicativeInverse() const;

		//! modular multiplication
		CRYPTOPP_DLL friend Integer a_times_b_mod_c(const Integer &x, const Integer& y, const Integer& m);
		//! modular exponentiation
		CRYPTOPP_DLL friend Integer a_exp_b_mod_c(const Integer &x, const Integer& e, const Integer& m);

		//! calculate r and q such that (a == d*q + r) && (0 <= r < abs(d))
		static void Divide(Integer &r, Integer &q, const Integer &a, const Integer &d);
		//! use a faster division algorithm when divisor is short
		static void Divide(word &r, Integer &q, const Integer &a, word d);

		//! returns same result as Divide(r, q, a, Power2(n)), but faster
		static void DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, unsigned int n);

		//! greatest common divisor
		static Integer Gcd(const Integer &a, const Integer &n);
		//! calculate multiplicative inverse of *this mod n
		Integer InverseMod(const Integer &n) const;
		//!
		word InverseMod(word n) const;
	//@}

	//! \name INPUT/OUTPUT
	//@{
		//!
		friend CRYPTOPP_DLL std::istream& operator>>(std::istream& in, Integer &a);
		//!
		friend CRYPTOPP_DLL std::ostream& operator<<(std::ostream& out, const Integer &a);
	//@}

private:
	friend class ModularArithmetic;
	friend class MontgomeryRepresentation;
	friend class HalfMontgomeryRepresentation;

	Integer(word value, unsigned int length);

	int PositiveCompare(const Integer &t) const;
	friend void PositiveAdd(Integer &sum, const Integer &a, const Integer &b);
	friend void PositiveSubtract(Integer &diff, const Integer &a, const Integer &b);
	friend void PositiveMultiply(Integer &product, const Integer &a, const Integer &b);
	friend void PositiveDivide(Integer &remainder, Integer &quotient, const Integer &dividend, const Integer &divisor);

	SecAlignedWordBlock reg;
	Sign sign;
};

//!
inline bool operator==(const CryptoPP::Integer& a, const CryptoPP::Integer& b) {return a.Compare(b)==0;}
//!
inline bool operator!=(const CryptoPP::Integer& a, const CryptoPP::Integer& b) {return a.Compare(b)!=0;}
//!
inline bool operator> (const CryptoPP::Integer& a, const CryptoPP::Integer& b) {return a.Compare(b)> 0;}
//!
inline bool operator>=(const CryptoPP::Integer& a, const CryptoPP::Integer& b) {return a.Compare(b)>=0;}
//!
inline bool operator< (const CryptoPP::Integer& a, const CryptoPP::Integer& b) {return a.Compare(b)< 0;}
//!
inline bool operator<=(const CryptoPP::Integer& a, const CryptoPP::Integer& b) {return a.Compare(b)<=0;}
//!
inline CryptoPP::Integer operator+(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.Plus(b);}
//!
inline CryptoPP::Integer operator-(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.Minus(b);}
//!
inline CryptoPP::Integer operator*(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.Times(b);}
//!
inline CryptoPP::Integer operator/(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.DividedBy(b);}
//!
inline CryptoPP::Integer operator%(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.Modulo(b);}
//!
inline CryptoPP::Integer operator/(const CryptoPP::Integer &a, CryptoPP::word b) {return a.DividedBy(b);}
//!
inline CryptoPP::word    operator%(const CryptoPP::Integer &a, CryptoPP::word b) {return a.Modulo(b);}

NAMESPACE_END

NAMESPACE_BEGIN(std)
template<> inline void swap(CryptoPP::Integer &a, CryptoPP::Integer &b)
{
	a.swap(b);
}
NAMESPACE_END

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费高清视频在线| 久久奇米777| 亚洲成人自拍一区| 欧美日韩激情一区| 日韩电影在线观看电影| 日韩欧美亚洲国产精品字幕久久久| 久热成人在线视频| 久久亚洲综合av| 成人丝袜视频网| 一区二区在线观看av| 欧美日韩国产高清一区二区三区| 蜜桃视频免费观看一区| 久久久国产午夜精品| 成人精品一区二区三区中文字幕| 亚洲色图丝袜美腿| 欧美精品欧美精品系列| 国产精一品亚洲二区在线视频| 日韩一区欧美小说| 制服丝袜一区二区三区| 韩国成人精品a∨在线观看| 国产欧美日韩不卡| 欧美在线一区二区三区| 久久精品国产秦先生| 日本一区二区三区视频视频| 91久久国产最好的精华液| 日本sm残虐另类| 国产精品蜜臀在线观看| 欧美乱妇15p| 成人午夜免费av| 亚洲va在线va天堂| 国产欧美精品区一区二区三区 | 日韩久久久精品| 国产福利一区在线观看| 亚洲综合色网站| 国产欧美日韩精品在线| 欧美乱妇15p| 97久久超碰国产精品| 另类的小说在线视频另类成人小视频在线 | 一个色妞综合视频在线观看| 欧美大片拔萝卜| 色综合久久久久综合| 国内不卡的二区三区中文字幕| 亚洲精品成人悠悠色影视| 精品少妇一区二区三区在线视频| 91麻豆文化传媒在线观看| 老司机精品视频导航| 亚洲国产精品久久艾草纯爱| 国产欧美精品一区| 欧美一级久久久久久久大片| 欧美无人高清视频在线观看| av高清不卡在线| 国产一区二区h| 日韩精品成人一区二区三区 | 7777精品伊人久久久大香线蕉经典版下载| 国产精品小仙女| 久久国产剧场电影| 天堂在线一区二区| 亚洲综合图片区| 亚洲三级在线看| 亚洲欧美在线高清| 国产精品国产自产拍高清av| 精品国产成人在线影院| 欧美一区二区三区在线观看视频| 色视频一区二区| 91在线视频18| 99精品视频在线观看免费| 成人夜色视频网站在线观看| 国产一区二区在线观看视频| 久久国产麻豆精品| 久久aⅴ国产欧美74aaa| 捆绑紧缚一区二区三区视频| 奇米777欧美一区二区| 男女性色大片免费观看一区二区| 午夜私人影院久久久久| 亚洲综合一区二区| 亚洲一区二区三区中文字幕在线| 一区二区在线观看免费视频播放| 亚洲美女在线一区| 亚洲免费观看高清完整版在线观看| 亚洲欧美在线视频| 一区二区三区在线播| 一区二区在线观看av| 亚洲一区二区欧美| 日韩精品久久理论片| 毛片av一区二区三区| 毛片av一区二区| 国产精品一区在线观看乱码| 波多野结衣一区二区三区 | 91福利在线导航| 一本色道**综合亚洲精品蜜桃冫| 亚洲美腿欧美偷拍| 久久噜噜亚洲综合| 成人激情校园春色| 亚洲视频免费看| 国产亚洲综合在线| 久久久久一区二区三区四区| 欧美一区二区久久久| 亚洲午夜久久久久久久久电影院| 国产精品69毛片高清亚洲| 91麻豆精品国产91久久久使用方法| 国产亚洲美州欧州综合国| 亚洲一区二区精品视频| 成人在线一区二区三区| 日韩精品一区国产麻豆| 亚洲综合一区在线| 成人激情综合网站| 欧美成人午夜电影| 亚洲一二三区不卡| 99综合影院在线| 精品久久久三级丝袜| 亚洲1区2区3区4区| 一本色道久久综合狠狠躁的推荐| 久久精品一二三| 老司机精品视频在线| 欧美日韩国产精选| 亚洲一区二区精品3399| 色综合久久66| 欧美国产乱子伦| 黑人精品欧美一区二区蜜桃| 91精品国产免费| 一区二区在线观看免费视频播放| 99综合电影在线视频| 国产清纯白嫩初高生在线观看91| 蜜桃91丨九色丨蝌蚪91桃色| 欧美日韩国产精品成人| 午夜电影一区二区三区| 在线观看日韩电影| 亚洲精品国产一区二区精华液| 成人ar影院免费观看视频| ww亚洲ww在线观看国产| 久久se精品一区精品二区| 91精品国产入口| 日韩精品视频网| 日韩一级在线观看| 久久国产三级精品| 精品久久久久久最新网址| 韩国v欧美v日本v亚洲v| 久久亚洲精精品中文字幕早川悠里| 男女男精品视频网| 精品黑人一区二区三区久久| 国产一区二三区| 国产欧美日韩综合| 成av人片一区二区| 亚洲卡通欧美制服中文| 日本高清不卡视频| 午夜激情综合网| 日韩欧美二区三区| 精品亚洲成a人| 国产调教视频一区| 91在线国产福利| 亚洲日本电影在线| 欧美视频你懂的| 青娱乐精品视频| 国产女人水真多18毛片18精品视频| hitomi一区二区三区精品| 国产精品人妖ts系列视频| 色诱视频网站一区| 日韩电影免费在线观看网站| 日韩女优视频免费观看| 国产乱码精品一品二品| 亚洲日本电影在线| 91.com视频| 国产激情91久久精品导航 | 成人免费看的视频| 亚洲精品视频在线观看免费 | 欧美三级一区二区| 久久er精品视频| 亚洲欧洲av在线| 欧美性xxxxxx少妇| 韩国一区二区三区| 怡红院av一区二区三区| 日韩欧美久久久| 99国产精品久久| 天天色综合成人网| 欧美国产日韩亚洲一区| 欧美日韩一级二级| 国产成人精品一区二| 亚洲综合免费观看高清在线观看| 日韩欧美另类在线| 一本色道综合亚洲| 激情另类小说区图片区视频区| 中文字幕一区二区不卡| 91精品国产综合久久久久久久久久| 国产成人午夜视频| 婷婷丁香激情综合| 中文字幕在线观看不卡视频| 91麻豆精品国产91久久久久| av激情成人网| 激情综合五月天| 亚洲国产aⅴ天堂久久| 国产欧美一区二区精品秋霞影院| 制服丝袜日韩国产| 成人av片在线观看| 国模套图日韩精品一区二区| 亚洲已满18点击进入久久| 欧美激情在线免费观看| 日韩一级欧美一级| 欧美偷拍一区二区| 不卡的电视剧免费网站有什么| 日本va欧美va精品发布|