C# Class Lidgren.Network.NetBigInteger

Big integer class based on BouncyCastle (http://www.bouncycastle.org) big integer code
Show file Open project: SleeplessByte/lidgren-srp6a Class Usage Examples

Public Properties

Property Type Description
One NetBigInteger
Ten NetBigInteger
Three NetBigInteger
Two NetBigInteger
Zero NetBigInteger

Public Methods

Method Description
Abs ( ) : NetBigInteger
Add ( NetBigInteger value ) : NetBigInteger
And ( NetBigInteger value ) : NetBigInteger
CompareTo ( NetBigInteger value ) : int
CompareTo ( object obj ) : int
Divide ( NetBigInteger val ) : NetBigInteger
DivideAndRemainder ( NetBigInteger val ) : Lidgren.Network.NetBigInteger[]
Equals ( object obj ) : bool
Gcd ( NetBigInteger value ) : NetBigInteger
GetHashCode ( ) : int
GetLowestSetBit ( ) : int
Max ( NetBigInteger value ) : NetBigInteger
Min ( NetBigInteger value ) : NetBigInteger
Mod ( NetBigInteger m ) : NetBigInteger
ModInverse ( NetBigInteger m ) : NetBigInteger
ModPow ( NetBigInteger exponent, NetBigInteger m ) : NetBigInteger
Modulus ( NetBigInteger val ) : NetBigInteger
Multiply ( NetBigInteger val ) : NetBigInteger
Negate ( ) : NetBigInteger
NetBigInteger ( byte bytes ) : System
NetBigInteger ( byte bytes, int offset, int length ) : System
NetBigInteger ( int sign, byte bytes ) : System
NetBigInteger ( int sign, byte bytes, int offset, int length ) : System
NetBigInteger ( string value ) : System
NetBigInteger ( string str, int radix ) : System
Not ( ) : NetBigInteger
Pow ( int exp ) : NetBigInteger
Remainder ( NetBigInteger n ) : NetBigInteger
ShiftLeft ( int n ) : NetBigInteger
ShiftRight ( int n ) : NetBigInteger
Subtract ( NetBigInteger n ) : NetBigInteger
TestBit ( int n ) : bool
ToByteArray ( ) : byte[]
ToByteArrayUnsigned ( ) : byte[]
ToString ( ) : string
ToString ( int radix ) : string
ValueOf ( long value ) : NetBigInteger

Private Methods

Method Description
AddMagnitudes ( int a, int b ) : int[]
AddToMagnitude ( int magToAdd ) : NetBigInteger
BitLen ( int w ) : int
CompareNoLeadingZeroes ( int xIndx, int x, int yIndx, int y ) : int
CompareTo ( int xIndx, int x, int yIndx, int y ) : int
Divide ( int x, int y ) : int[]
ExtEuclid ( NetBigInteger a, NetBigInteger b, NetBigInteger u1Out, NetBigInteger u2Out ) : NetBigInteger
FastExtEuclid ( long a, long b, long uOut ) : long
FastModInverse ( long v, long m ) : long
GetByteLength ( int nBits ) : int
GetMQuote ( ) : long
Inc ( ) : NetBigInteger
LastNBits ( int n ) : int[]
MakeMagnitude ( byte bytes, int offset, int length ) : int[]
Multiply ( int x, int y, int z ) : int[]
MultiplyMonty ( int a, int x, int y, int m, long mQuote ) : void
MultiplyMontyNIsOne ( uint x, uint y, uint m, ulong mQuote ) : uint
NetBigInteger ( ) : System
NetBigInteger ( int signum, int mag, bool checkMag ) : System
QuickPow2Check ( ) : bool
Remainder ( int m ) : int
Remainder ( int x, int y ) : int[]
ShiftLeft ( int mag, int n ) : int[]
ShiftRightInPlace ( int start, int mag, int n ) : int[]
ShiftRightOneInPlace ( int start, int mag ) : int[]
Square ( int w, int x ) : int[]
Subtract ( int xStart, int x, int yStart, int y ) : int[]
ToByteArray ( bool unsigned ) : byte[]
ZeroOut ( int x ) : void
calcBitLength ( int indx, int mag ) : int
createUValueOf ( ulong value ) : NetBigInteger
createValueOf ( long value ) : NetBigInteger
doSubBigLil ( int bigMag, int lilMag ) : int[]

Method Details

Abs() public method

public Abs ( ) : NetBigInteger
return NetBigInteger

Add() public method

public Add ( NetBigInteger value ) : NetBigInteger
value NetBigInteger
return NetBigInteger

And() public method

public And ( NetBigInteger value ) : NetBigInteger
value NetBigInteger
return NetBigInteger

CompareTo() public method

public CompareTo ( NetBigInteger value ) : int
value NetBigInteger
return int

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

Divide() public method

public Divide ( NetBigInteger val ) : NetBigInteger
val NetBigInteger
return NetBigInteger

DivideAndRemainder() public method

public DivideAndRemainder ( NetBigInteger val ) : Lidgren.Network.NetBigInteger[]
val NetBigInteger
return Lidgren.Network.NetBigInteger[]

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

Gcd() public method

public Gcd ( NetBigInteger value ) : NetBigInteger
value NetBigInteger
return NetBigInteger

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetLowestSetBit() public method

public GetLowestSetBit ( ) : int
return int

Max() public method

public Max ( NetBigInteger value ) : NetBigInteger
value NetBigInteger
return NetBigInteger

Min() public method

public Min ( NetBigInteger value ) : NetBigInteger
value NetBigInteger
return NetBigInteger

Mod() public method

public Mod ( NetBigInteger m ) : NetBigInteger
m NetBigInteger
return NetBigInteger

ModInverse() public method

public ModInverse ( NetBigInteger m ) : NetBigInteger
m NetBigInteger
return NetBigInteger

ModPow() public method

public ModPow ( NetBigInteger exponent, NetBigInteger m ) : NetBigInteger
exponent NetBigInteger
m NetBigInteger
return NetBigInteger

Modulus() public method

public Modulus ( NetBigInteger val ) : NetBigInteger
val NetBigInteger
return NetBigInteger

Multiply() public method

public Multiply ( NetBigInteger val ) : NetBigInteger
val NetBigInteger
return NetBigInteger

Negate() public method

public Negate ( ) : NetBigInteger
return NetBigInteger

NetBigInteger() public method

public NetBigInteger ( byte bytes ) : System
bytes byte
return System

NetBigInteger() public method

public NetBigInteger ( byte bytes, int offset, int length ) : System
bytes byte
offset int
length int
return System

NetBigInteger() public method

public NetBigInteger ( int sign, byte bytes ) : System
sign int
bytes byte
return System

NetBigInteger() public method

public NetBigInteger ( int sign, byte bytes, int offset, int length ) : System
sign int
bytes byte
offset int
length int
return System

NetBigInteger() public method

public NetBigInteger ( string value ) : System
value string
return System

NetBigInteger() public method

public NetBigInteger ( string str, int radix ) : System
str string
radix int
return System

Not() public method

public Not ( ) : NetBigInteger
return NetBigInteger

Pow() public method

public Pow ( int exp ) : NetBigInteger
exp int
return NetBigInteger

Remainder() public method

public Remainder ( NetBigInteger n ) : NetBigInteger
n NetBigInteger
return NetBigInteger

ShiftLeft() public method

public ShiftLeft ( int n ) : NetBigInteger
n int
return NetBigInteger

ShiftRight() public method

public ShiftRight ( int n ) : NetBigInteger
n int
return NetBigInteger

Subtract() public method

public Subtract ( NetBigInteger n ) : NetBigInteger
n NetBigInteger
return NetBigInteger

TestBit() public method

public TestBit ( int n ) : bool
n int
return bool

ToByteArray() public method

public ToByteArray ( ) : byte[]
return byte[]

ToByteArrayUnsigned() public method

public ToByteArrayUnsigned ( ) : byte[]
return byte[]

ToString() public method

public ToString ( ) : string
return string

ToString() public method

public ToString ( int radix ) : string
radix int
return string

ValueOf() public static method

public static ValueOf ( long value ) : NetBigInteger
value long
return NetBigInteger

Property Details

One public static property

public static NetBigInteger,Lidgren.Network One
return NetBigInteger

Ten public static property

public static NetBigInteger,Lidgren.Network Ten
return NetBigInteger

Three public static property

public static NetBigInteger,Lidgren.Network Three
return NetBigInteger

Two public static property

public static NetBigInteger,Lidgren.Network Two
return NetBigInteger

Zero public static property

public static NetBigInteger,Lidgren.Network Zero
return NetBigInteger