C# Класс BigInteger, otp.net

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
dataLength int
primesBelow2000 int[]

Открытые методы

Метод Описание
BigInteger ( ) : System
BigInteger ( BigInteger, bi ) : System
BigInteger ( byte inData ) : System
BigInteger ( byte inData, int inLen ) : System
BigInteger ( long value ) : System
BigInteger ( string value, int radix ) : System
BigInteger ( uint inData ) : System
BigInteger ( ulong value ) : System
Equals ( object o ) : bool
FermatLittleTest ( int confidence ) : bool
GetHashCode ( ) : int
IntValue ( ) : int
Jacobi ( BigInteger a, BigInteger b ) : int
LongValue ( ) : long
LucasSequence ( BigInteger P, BigInteger Q, BigInteger k, BigInteger n ) : BigInteger[]
LucasStrongTest ( ) : bool
MulDivTest ( int rounds ) : void
RSATest ( int rounds ) : void
RSATest2 ( int rounds ) : void
RabinMillerTest ( int confidence ) : bool
SolovayStrassenTest ( int confidence ) : bool
SqrtTest ( int rounds ) : void
ToHexString ( ) : string
ToString ( ) : string
ToString ( int radix ) : string
aMain ( string args ) : void
abs ( ) : BigInteger
bitCount ( ) : int
gcd ( BigInteger bi ) : BigInteger
genCoPrime ( int bits, Random rand ) : BigInteger
genPseudoPrime ( int bits, int confidence, Random rand ) : BigInteger
genRandomBits ( int bits, Random rand ) : void
getBytes ( ) : byte[]
isProbablePrime ( ) : bool
isProbablePrime ( int confidence ) : bool
max ( BigInteger bi ) : BigInteger
min ( BigInteger bi ) : BigInteger
modInverse ( BigInteger modulus ) : BigInteger
modPow ( BigInteger exp, BigInteger n ) : BigInteger
operator ( ) : BigInteger
operator ( ) : bool
setBit ( uint bitNum ) : void
sqrt ( ) : BigInteger
unsetBit ( uint bitNum ) : void

Приватные методы

Метод Описание
BarrettReduction ( BigInteger, x, BigInteger, n, BigInteger, constant ) : BigInteger,
LucasSequenceHelper ( BigInteger P, BigInteger Q, BigInteger k, BigInteger n, BigInteger constant, int s ) : BigInteger[]
LucasStrongTestHelper ( BigInteger thisVal ) : bool
multiByteDivide ( BigInteger bi1, BigInteger bi2, BigInteger outQuotient, BigInteger outRemainder ) : void
shiftLeft ( uint buffer, int shiftVal ) : int
shiftRight ( uint buffer, int shiftVal ) : int
singleByteDivide ( BigInteger bi1, BigInteger bi2, BigInteger outQuotient, BigInteger outRemainder ) : void

Описание методов

BigInteger() публичный Метод

public BigInteger ( ) : System
Результат System

BigInteger() публичный Метод

public BigInteger ( BigInteger, bi ) : System
bi BigInteger,
Результат System

BigInteger() публичный Метод

public BigInteger ( byte inData ) : System
inData byte
Результат System

BigInteger() публичный Метод

public BigInteger ( byte inData, int inLen ) : System
inData byte
inLen int
Результат System

BigInteger() публичный Метод

public BigInteger ( long value ) : System
value long
Результат System

BigInteger() публичный Метод

public BigInteger ( string value, int radix ) : System
value string
radix int
Результат System

BigInteger() публичный Метод

public BigInteger ( uint inData ) : System
inData uint
Результат System

BigInteger() публичный Метод

public BigInteger ( ulong value ) : System
value ulong
Результат System

Equals() публичный Метод

public Equals ( object o ) : bool
o object
Результат bool

FermatLittleTest() публичный Метод

public FermatLittleTest ( int confidence ) : bool
confidence int
Результат bool

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

IntValue() публичный Метод

public IntValue ( ) : int
Результат int

Jacobi() публичный статический Метод

public static Jacobi ( BigInteger a, BigInteger b ) : int
a BigInteger
b BigInteger
Результат int

LongValue() публичный Метод

public LongValue ( ) : long
Результат long

LucasSequence() публичный статический Метод

public static LucasSequence ( BigInteger P, BigInteger Q, BigInteger k, BigInteger n ) : BigInteger[]
P BigInteger
Q BigInteger
k BigInteger
n BigInteger
Результат BigInteger[]

LucasStrongTest() публичный Метод

public LucasStrongTest ( ) : bool
Результат bool

MulDivTest() публичный статический Метод

public static MulDivTest ( int rounds ) : void
rounds int
Результат void

RSATest() публичный статический Метод

public static RSATest ( int rounds ) : void
rounds int
Результат void

RSATest2() публичный статический Метод

public static RSATest2 ( int rounds ) : void
rounds int
Результат void

RabinMillerTest() публичный Метод

public RabinMillerTest ( int confidence ) : bool
confidence int
Результат bool

SolovayStrassenTest() публичный Метод

public SolovayStrassenTest ( int confidence ) : bool
confidence int
Результат bool

SqrtTest() публичный статический Метод

public static SqrtTest ( int rounds ) : void
rounds int
Результат void

ToHexString() публичный Метод

public ToHexString ( ) : string
Результат string

ToString() публичный Метод

public ToString ( ) : string
Результат string

ToString() публичный Метод

public ToString ( int radix ) : string
radix int
Результат string

aMain() публичный статический Метод

public static aMain ( string args ) : void
args string
Результат void

abs() публичный Метод

public abs ( ) : BigInteger
Результат BigInteger

bitCount() публичный Метод

public bitCount ( ) : int
Результат int

gcd() публичный Метод

public gcd ( BigInteger bi ) : BigInteger
bi BigInteger
Результат BigInteger

genCoPrime() публичный Метод

public genCoPrime ( int bits, Random rand ) : BigInteger
bits int
rand Random
Результат BigInteger

genPseudoPrime() публичный статический Метод

public static genPseudoPrime ( int bits, int confidence, Random rand ) : BigInteger
bits int
confidence int
rand Random
Результат BigInteger

genRandomBits() публичный Метод

public genRandomBits ( int bits, Random rand ) : void
bits int
rand Random
Результат void

getBytes() публичный Метод

public getBytes ( ) : byte[]
Результат byte[]

isProbablePrime() публичный Метод

public isProbablePrime ( ) : bool
Результат bool

isProbablePrime() публичный Метод

public isProbablePrime ( int confidence ) : bool
confidence int
Результат bool

max() публичный Метод

public max ( BigInteger bi ) : BigInteger
bi BigInteger
Результат BigInteger

min() публичный Метод

public min ( BigInteger bi ) : BigInteger
bi BigInteger
Результат BigInteger

modInverse() публичный Метод

public modInverse ( BigInteger modulus ) : BigInteger
modulus BigInteger
Результат BigInteger

modPow() публичный Метод

public modPow ( BigInteger exp, BigInteger n ) : BigInteger
exp BigInteger
n BigInteger
Результат BigInteger

operator() публичный статический Метод

public static operator ( ) : BigInteger
Результат BigInteger

operator() публичный статический Метод

public static operator ( ) : bool
Результат bool

setBit() публичный Метод

public setBit ( uint bitNum ) : void
bitNum uint
Результат void

sqrt() публичный Метод

public sqrt ( ) : BigInteger
Результат BigInteger

unsetBit() публичный Метод

public unsetBit ( uint bitNum ) : void
bitNum uint
Результат void

Описание свойств

dataLength публичное свойство

public int dataLength
Результат int

primesBelow2000 публичное статическое свойство

public static int[] primesBelow2000
Результат int[]