C# Class Granados.Mono.Math.BigInteger

Afficher le fichier Open project: poderosaproject/poderosa Class Usage Examples

Private Properties

Свойство Type Description
BigInteger System
BigInteger System
BigInteger System
BigInteger System
ClearBit void
Modulus uint
Normalize void
SetBit void
SetBit void
TestBit bool
ToString string
ToString string
operator bool
operator uint

Méthodes publiques

Méthode Description
Add ( BigInteger bi1, BigInteger bi2 ) : BigInteger
BigInteger ( ) : System
BigInteger ( BigInteger bi ) : System
BigInteger ( byte inData ) : System
BitCount ( ) : int
Clear ( ) : void
Compare ( BigInteger bi ) : Sign
Divid ( BigInteger bi1, BigInteger bi2 ) : BigInteger
Divid ( BigInteger bi, int i ) : BigInteger
Equals ( object o ) : bool
GCD ( BigInteger bi ) : BigInteger
GeneratePseudoPrime ( int bits ) : BigInteger
GenerateRandom ( int bits ) : BigInteger

Generates a new, random BigInteger of the specified length using the default RNG crypto service provider.

GenerateRandom ( int bits, RandomNumberGenerator rng ) : BigInteger

Generates a new, random BigInteger of the specified length.

GetBytes ( ) : byte[]
GetHashCode ( ) : int
Incr2 ( ) : void

Increments this by two

IsProbablePrime ( ) : bool
LowestSetBit ( ) : int
ModInverse ( BigInteger modulus ) : BigInteger
ModPow ( BigInteger exp, BigInteger n ) : BigInteger
Modulus ( BigInteger bi1, BigInteger bi2 ) : BigInteger
Modulus ( BigInteger bi, int i ) : int
Multiply ( BigInteger bi1, BigInteger bi2 ) : BigInteger
Multiply ( BigInteger bi, int i ) : BigInteger
NextHighestPrime ( BigInteger bi ) : BigInteger

Generates the smallest prime >= bi

Parse ( string number ) : BigInteger
Randomize ( ) : void

Randomizes the bits in "this" from the default RNG.

Randomize ( RandomNumberGenerator rng ) : void

Randomizes the bits in "this" from the specified RNG.

Subtract ( BigInteger bi1, BigInteger bi2 ) : BigInteger
TestBit ( int bitNum ) : bool
ToString ( ) : string
operator ( ) : BigInteger
operator ( ) : int

Private Methods

Méthode Description
BigInteger ( BigInteger bi, uint len ) : System
BigInteger ( Sign sign, uint len ) : System
BigInteger ( uint inData ) : System
BigInteger ( ulong ul ) : System
ClearBit ( uint bitNum ) : void
Modulus ( BigInteger bi, uint ui ) : uint
Normalize ( ) : void

Normalizes this by setting the length to the actual number of uints used in data and by setting the sign to Sign.Zero if the value of this is 0.

SetBit ( uint bitNum ) : void
SetBit ( uint bitNum, bool value ) : void
TestBit ( uint bitNum ) : bool
ToString ( uint radix ) : string
ToString ( uint radix, string characterSet ) : string
operator ( ) : bool
operator ( ) : uint

Method Details

Add() public static méthode

public static Add ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Résultat BigInteger

BigInteger() public méthode

public BigInteger ( ) : System
Résultat System

BigInteger() public méthode

public BigInteger ( BigInteger bi ) : System
bi BigInteger
Résultat System

BigInteger() public méthode

public BigInteger ( byte inData ) : System
inData byte
Résultat System

BitCount() public méthode

public BitCount ( ) : int
Résultat int

Clear() public méthode

public Clear ( ) : void
Résultat void

Compare() public méthode

public Compare ( BigInteger bi ) : Sign
bi BigInteger
Résultat Sign

Divid() public static méthode

public static Divid ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Résultat BigInteger

Divid() public static méthode

public static Divid ( BigInteger bi, int i ) : BigInteger
bi BigInteger
i int
Résultat BigInteger

Equals() public méthode

public Equals ( object o ) : bool
o object
Résultat bool

GCD() public méthode

public GCD ( BigInteger bi ) : BigInteger
bi BigInteger
Résultat BigInteger

GeneratePseudoPrime() public static méthode

public static GeneratePseudoPrime ( int bits ) : BigInteger
bits int
Résultat BigInteger

GenerateRandom() public static méthode

Generates a new, random BigInteger of the specified length using the default RNG crypto service provider.
public static GenerateRandom ( int bits ) : BigInteger
bits int The number of bits for the new number.
Résultat BigInteger

GenerateRandom() public static méthode

Generates a new, random BigInteger of the specified length.
public static GenerateRandom ( int bits, RandomNumberGenerator rng ) : BigInteger
bits int The number of bits for the new number.
rng System.Security.Cryptography.RandomNumberGenerator A random number generator to use to obtain the bits.
Résultat BigInteger

GetBytes() public méthode

public GetBytes ( ) : byte[]
Résultat byte[]

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Incr2() public méthode

Increments this by two
public Incr2 ( ) : void
Résultat void

IsProbablePrime() public méthode

public IsProbablePrime ( ) : bool
Résultat bool

LowestSetBit() public méthode

public LowestSetBit ( ) : int
Résultat int

ModInverse() public méthode

public ModInverse ( BigInteger modulus ) : BigInteger
modulus BigInteger
Résultat BigInteger

ModPow() public méthode

public ModPow ( BigInteger exp, BigInteger n ) : BigInteger
exp BigInteger
n BigInteger
Résultat BigInteger

Modulus() public static méthode

public static Modulus ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Résultat BigInteger

Modulus() public static méthode

public static Modulus ( BigInteger bi, int i ) : int
bi BigInteger
i int
Résultat int

Multiply() public static méthode

public static Multiply ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Résultat BigInteger

Multiply() public static méthode

public static Multiply ( BigInteger bi, int i ) : BigInteger
bi BigInteger
i int
Résultat BigInteger

NextHighestPrime() public static méthode

Generates the smallest prime >= bi
public static NextHighestPrime ( BigInteger bi ) : BigInteger
bi BigInteger A BigInteger
Résultat BigInteger

Parse() public static méthode

public static Parse ( string number ) : BigInteger
number string
Résultat BigInteger

Randomize() public méthode

Randomizes the bits in "this" from the default RNG.
public Randomize ( ) : void
Résultat void

Randomize() public méthode

Randomizes the bits in "this" from the specified RNG.
public Randomize ( RandomNumberGenerator rng ) : void
rng System.Security.Cryptography.RandomNumberGenerator A RNG.
Résultat void

Subtract() public static méthode

public static Subtract ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Résultat BigInteger

TestBit() public méthode

public TestBit ( int bitNum ) : bool
bitNum int
Résultat bool

ToString() public méthode

public ToString ( ) : string
Résultat string

operator() public static méthode

public static operator ( ) : BigInteger
Résultat BigInteger

operator() public static méthode

public static operator ( ) : int
Résultat int