?? vlong.h
字號:
#include "uvlong.h"
//---------------------------------------------------------------------------
class vlong //:public uvlong // Provides storage allocation and index checking
{
friend class CDBlock;
friend class public_key;
public:
vlong& operator =( const vlong& x );
vlong& operator +=( const vlong& x );
vlong& operator -=( const vlong& x );
friend vlong operator +( const vlong& x, const vlong& y );
friend vlong operator -( const vlong& x, const vlong& y );
friend vlong operator *( const vlong& x, const vlong& y );
friend vlong operator /( const vlong& x, const vlong& y );
friend vlong operator %( const vlong& x, const vlong& y );
// Standard comparison operators
friend int operator !=( const vlong& x, const vlong& y ){ return comp_vl(x, y ) != 0; }
friend int operator ==( const vlong& x, const vlong& y ){ return comp_vl(x, y ) == 0; }
friend int operator >=( const vlong& x, const vlong& y ){ return comp_vl(x, y ) >= 0; }
friend int operator <=( const vlong& x, const vlong& y ){ return comp_vl(x, y ) <= 0; }
friend int operator > ( const vlong& x, const vlong& y ){ return comp_vl(x, y ) > 0; }
friend int operator < ( const vlong& x, const vlong& y ){ return comp_vl(x, y ) < 0; }
/*比較a和b兩大數*/
friend int comp_vl ( const vlong a, const vlong b);
/*找一個大的素數*/
friend bool findprime ( vlong &out, unsigned int bitlen );
/*生成一個bitlen位的隨機數*/
friend bool randval ( vlong &out, unsigned int bitlen );
/*求乘法逆元方法1*/
friend bool modinv1 ( const vlong &e, const vlong &m, vlong &u, vlong &v );
/*求乘法逆元方法2*/
friend bool modinv2 ( const vlong &e, const vlong &m, vlong &d );
/*求vlong型的次冪求模*/
friend bool modexp ( const vlong & m, const vlong & e, const vlong & mod, vlong & result);
vlong ( int x = 0 );
vlong ( const vlong& x );
virtual~vlong();
operator unsigned ();
private:
int m_nNegative;
class uvlong* m_pValue;
public:
ushort * m_clint;
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -