95 instantiations of BigInteger
Microsoft.CodeAnalysis (2)
RealParser.cs (2)
62private static readonly BigInteger s_bigTwo = new BigInteger(2); 63private static readonly BigInteger s_bigTen = new BigInteger(10);
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
100P10 = new BigInteger(3.1415),
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnDecoder.Integer.cs (1)
108BigInteger value = new BigInteger(contents, isBigEndian: true);
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
225largeValue = new BigInteger(tmpBytes);
System.Formats.Cbor (1)
System\Formats\Cbor\CborHelpers.netcoreapp.cs (1)
16=> new BigInteger(bytes, isUnsigned: true, isBigEndian: true);
System.Runtime.Numerics (81)
System\Number.BigInteger.cs (6)
227result = new BigInteger((int)signedLeading, null); 237result = new BigInteger((int)signBits | 1, [(leading ^ signBits) - signBits]); 243result = new BigInteger(-1, [0, 1]); 290result = new BigInteger(-1, bits); 298result = new BigInteger(1, bits); 414result = new BigInteger(resultBuffer, number.IsNegative);
System\Numerics\BigInteger.cs (75)
59private static readonly BigInteger s_int32MinValue = new(-1, [UInt32HighBit]); 60private static readonly BigInteger s_one = new(1); 61private static readonly BigInteger s_zero = new(0); 62private static readonly BigInteger s_minusOne = new(-1); 866return new BigInteger((int)NumericsHelpers.Abs(value._sign), value._bits); 927return new BigInteger(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 947remainder = new(rest, dividend._sign < 0); 948BigInteger result = new(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 1044: new BigInteger(+1, right._bits); 1052: new BigInteger(+1, left._bits); 1091result = new BigInteger(bits, negative: false); 1151result = new BigInteger(bits, value._sign < 0 && !exponent.IsEven); 1199result = new BigInteger(bits, value._sign < 0 && (exponent & 1) != 0); 1208result = new BigInteger(bits, value._sign < 0 && (exponent & 1) != 0); 1888result = new BigInteger(bits, leftSign < 0); 1899result = new BigInteger(bits, leftSign < 0); 1910result = new BigInteger(bits, leftSign < 0); 1921result = new BigInteger(bits, leftSign < 0); 1957result = new BigInteger(bits, leftSign >= 0); 1968result = new BigInteger(bits, leftSign < 0); 1977result = new BigInteger(bits, leftSign >= 0); 1988result = new BigInteger(bits, leftSign < 0); 2293public static explicit operator BigInteger(decimal value) => new BigInteger(value); 2295public static explicit operator BigInteger(double value) => new BigInteger(value); 2300public static explicit operator BigInteger(Half value) => new BigInteger((float)value); 2305public static explicit operator BigInteger(BFloat16 value) => new BigInteger((float)value); 2320public static explicit operator BigInteger(float value) => new BigInteger(value); 2326public static implicit operator BigInteger(byte value) => new BigInteger(value); 2331public static implicit operator BigInteger(char value) => new BigInteger(value); 2333public static implicit operator BigInteger(short value) => new BigInteger(value); 2335public static implicit operator BigInteger(int value) => new BigInteger(value); 2337public static implicit operator BigInteger(long value) => new BigInteger(value); 2404return new BigInteger(sign, bits); 2410public static implicit operator BigInteger(nint value) => new BigInteger(value); 2413public static implicit operator BigInteger(sbyte value) => new BigInteger(value); 2416public static implicit operator BigInteger(ushort value) => new BigInteger(value); 2419public static implicit operator BigInteger(uint value) => new BigInteger(value); 2422public static implicit operator BigInteger(ulong value) => new BigInteger(value); 2473return new BigInteger(sign, bits); 2480public static implicit operator BigInteger(nuint value) => value <= int.MaxValue ? new BigInteger((int)value, null) : new BigInteger(+1, [value]); 2559BigInteger result = new(z); 2621return new BigInteger(value._sign, z); 2644return new BigInteger(value >= 0 ? (int)r : -(int)r, null); 2657return new BigInteger(value > 0 ? 1 : -1, rgu); 2689return new BigInteger(value._sign >> smallShift, null); 2700return new BigInteger(value._sign >> 31, null); 2721BigInteger result = new(zd, neg); 2746result = new BigInteger(bits, negative: true); 2755result = new BigInteger(bits, negative: false); 2762public static BigInteger operator -(BigInteger value) => new BigInteger(-value._sign, value._bits); 2781result = new BigInteger(bits, negative: false); 2789result = new BigInteger(bits, negative: true); 2810result = new BigInteger(bits, negative: false); 2819result = new BigInteger(bits, negative: true); 2860result = new BigInteger(bits, (leftSign < 0) ^ (rightSign < 0)); 2871result = new BigInteger(bits, (leftSign < 0) ^ (rightSign < 0)); 2880result = new BigInteger(bits, (leftSign < 0) ^ (rightSign < 0)); 2891result = new BigInteger(bits, (leftSign < 0) ^ (rightSign < 0)); 2925BigInteger result = new BigInteger(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 2944BigInteger result = new(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 2987BigInteger result = new(bits, dividend._sign < 0); 3262? new BigInteger((nint)rs) 3263: new BigInteger(rs); 3283? new BigInteger((nint)rs) 3284: new BigInteger(rs); 3336BigInteger result = new(zd, negative); 3372value = new BigInteger(source, isUnsigned, isBigEndian: true); 3379value = new BigInteger(source, isUnsigned, isBigEndian: false); 5024return new BigInteger((nint)value._sign >>> smallShift); 5065return new BigInteger(nint.MinValue >>> smallShift); 5070return new BigInteger(smallShift == 0 ? -1 : +1, rgu); 5113result = new BigInteger(zd, true); 5117result = new BigInteger(zd, false); 5125return new BigInteger(value._sign >> 31, null);
System.Security.Cryptography (4)
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (1)
43x = new BigInteger(xSpan, isUnsigned: true, isBigEndian: true);
System\Security\Cryptography\X509Certificates\FindPal.cs (2)
95BigInteger hexValue = new BigInteger(hexBytes, isUnsigned: true, isBigEndian: true); 245BigInteger ten = new BigInteger(10);
System\Security\Cryptography\X509Certificates\ManagedCertificateFinder.cs (1)
106BigInteger serialNumber = new BigInteger(serialBytes, isUnsigned: true);
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
183=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg)));
System.Security.Cryptography.Pkcs (2)
System\Security\Cryptography\Pkcs\CmsSignature.cs (2)
244BigInteger val = new BigInteger( 252val = new BigInteger(
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (1)
171h = new BigInteger(bytes);
660 references to BigInteger
Microsoft.AspNetCore.Http.Extensions (4)
src\Shared\ParameterBindingMethodCache.cs (4)
672else if (type == typeof(BigInteger)) 674method = typeof(BigInteger).GetMethod( 675nameof(BigInteger.TryParse), 677new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(BigInteger).MakeByRefType() });
Microsoft.AspNetCore.Mvc.Abstractions (4)
src\Shared\ParameterBindingMethodCache.cs (4)
672else if (type == typeof(BigInteger)) 674method = typeof(BigInteger).GetMethod( 675nameof(BigInteger.TryParse), 677new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(BigInteger).MakeByRefType() });
Microsoft.AspNetCore.OpenApi (4)
src\Shared\ParameterBindingMethodCache.cs (4)
672else if (type == typeof(BigInteger)) 674method = typeof(BigInteger).GetMethod( 675nameof(BigInteger.TryParse), 677new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(BigInteger).MakeByRefType() });
Microsoft.CodeAnalysis (25)
RealParser.cs (22)
60private static readonly BigInteger s_bigZero = BigInteger.Zero; 61private static readonly BigInteger s_bigOne = BigInteger.One; 62private static readonly BigInteger s_bigTwo = new BigInteger(2); 63private static readonly BigInteger s_bigTen = new BigInteger(10); 415BigInteger integerValue = AccumulateDecimalDigitsIntoBigInteger(data, integerFirstIndex, integerLastIndex); 465BigInteger fractionalNumerator = AccumulateDecimalDigitsIntoBigInteger(data, fractionalFirstIndex, fractionalLastIndex); 468BigInteger fractionalDenominator = s_bigOne; 531BigInteger fractionalRemainder; 532BigInteger bigFractionalMantissa = BigInteger.DivRem(fractionalNumerator, fractionalDenominator, out fractionalRemainder); 621private static BigInteger AccumulateDecimalDigitsIntoBigInteger(DecimalFloatingPointString data, uint integer_first_index, uint integer_last_index) 625return BigInteger.Parse(valueString); 661private static uint CountSignificantBits(BigInteger data, out byte[] dataBytes) 682private static uint CountSignificantBits(BigInteger data) 750private static void ShiftLeft(ref BigInteger number, uint shift) 752var powerOfTwo = BigInteger.Pow(s_bigTwo, (int)shift); 761private static void MultiplyByPowerOfTen(ref BigInteger number, uint power) 763var powerOfTen = BigInteger.Pow(s_bigTen, (int)power);
VersionHelper.cs (3)
106System.Numerics.BigInteger number = 0; 152System.Numerics.BigInteger number; 153if (System.Numerics.BigInteger.TryParse(s, NumberStyles.None, CultureInfo.InvariantCulture, out number))
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesSpecialTypesExtensions.cs (1)
27public BigInteger P10 { get; set; }
Microsoft.Gen.Logging.Unit.Tests (3)
CompilationHelper.cs (1)
37refs.Add(MetadataReference.CreateFromFile(typeof(BigInteger).Assembly.Location));
EmitterTests.cs (1)
47Assembly.GetAssembly(typeof(BigInteger))!,
ParserTests.cs (1)
727Assembly.GetAssembly(typeof(BigInteger))!,
Microsoft.ML.Parquet (2)
ParquetLoader.cs (2)
517return CreateGetterDelegateCore<BigInteger, DataViewRowId>(col, _parquetConversions.Conv); 725public void Conv(in BigInteger src, ref DataViewRowId dst)
netstandard (1)
netstandard.cs (1)
1331[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.BigInteger))]
PresentationBuildTasks (3)
MS\Internal\MarkupCompiler\VersionHelper.cs (3)
114System.Numerics.BigInteger number = 0; 163System.Numerics.BigInteger number; 164if (System.Numerics.BigInteger.TryParse(s, NumberStyles.None, CultureInfo.InvariantCulture, out number))
System.Data.Common (51)
System\Data\Common\BigIntegerStorage.cs (23)
13private BigInteger[] _values = default!; // Late-initialized 16base(column, typeof(BigInteger), BigInteger.Zero, StorageType.BigInteger) 27BigInteger valueNo1 = _values[recordNo1]; 28BigInteger valueNo2 = _values[recordNo2]; 52BigInteger valueNo1 = _values[recordNo]; 58return valueNo1.CompareTo((BigInteger)value); 62internal static BigInteger ConvertToBigInteger(object value, IFormatProvider formatProvider) 64if (value.GetType() == typeof(BigInteger)) { return (BigInteger)value; } 65else if (value.GetType() == typeof(string)) { return BigInteger.Parse((string)value, formatProvider); } 74else { throw ExceptionBuilder.ConvertFailed(value.GetType(), typeof(System.Numerics.BigInteger)); } 77internal static object ConvertFromBigInteger(BigInteger value, Type type, IFormatProvider formatProvider) 91else if (type == typeof(System.Numerics.BigInteger)) { return value; } 92else { throw ExceptionBuilder.ConvertFailed(typeof(System.Numerics.BigInteger), type); } 119BigInteger value = _values[record]; 132_values[record] = BigInteger.Zero; 152return BigInteger.Parse(s, System.Globalization.CultureInfo.InvariantCulture); 159return ((BigInteger)value).ToString("D", System.Globalization.CultureInfo.InvariantCulture); 164return new BigInteger[recordCount]; 169BigInteger[] typedStore = (BigInteger[])store; 176_values = (BigInteger[])store;
System\Data\Common\DataStorage.cs (2)
92typeof(System.Numerics.BigInteger), 579dataType = typeof(System.Numerics.BigInteger);
System\Data\Common\SQLConvert.cs (3)
350if (type == typeof(System.Numerics.BigInteger)) 355else if (value is System.Numerics.BigInteger) 357return BigIntegerStorage.ConvertFromBigInteger((System.Numerics.BigInteger)value, type, formatProvider);
System\Data\DataColumn.cs (17)
262if ((BigInteger)AutoIncrementSeed != BigIntegerStorage.ConvertToBigInteger(value, FormatProvider)) 270(_autoInc ??= ((DataType == typeof(BigInteger)) ? 512if (_defaultValue is BigInteger) 514_defaultValue = BigIntegerStorage.ConvertFromBigInteger((BigInteger)_defaultValue, value, FormatProvider); 516else if (typeof(BigInteger) == value) 584AutoInc.Current = (BigInteger)(long)inc.Current; 588AutoInc.Current = checked((long)(BigInteger)inc.Current); 1608dataType == typeof(BigInteger) || 1956Debug.Assert(null != value && DataColumn.IsAutoIncrementType(value.GetType()) && !(value is BigInteger), "unexpected value for autoincrement"); 1964private bool BoundaryCheck(BigInteger value) => 1972private BigInteger _current; 1978private BigInteger _step = 1; 1984set { _current = (BigInteger)value; } 1987internal override Type DataType => typeof(BigInteger); 2037BigInteger v = (BigInteger)value; 2044private bool BoundaryCheck(BigInteger value) =>
System\Data\TypeLimiter.cs (1)
170typeof(BigInteger),
System\Data\xmlsaver.cs (5)
87else if (entry.Value is System.Numerics.BigInteger) 89v = (string)BigIntegerStorage.ConvertFromBigInteger((System.Numerics.BigInteger)entry.Value, typeof(string), CultureInfo.InvariantCulture); 199if (bIsSqlType || (col.DataType == typeof(System.Numerics.BigInteger))) 265if (type == typeof(System.Numerics.BigInteger)) 1348if ((col.IsSqlType && ((dt.Length == 0) || col.ImplementsINullable)) || (typeof(SqlXml) == col.DataType) || col.DataType == typeof(DateTimeOffset) || col.DataType == typeof(System.Numerics.BigInteger))
System.Formats.Asn1 (19)
System\Formats\Asn1\AsnDecoder.Integer.cs (6)
99public static BigInteger ReadInteger( 108BigInteger value = new BigInteger(contents, isBigEndian: true); 584public BigInteger ReadInteger(Asn1Tag? expectedTag = null) 586BigInteger ret = AsnDecoder.ReadInteger(_data.Span, RuleSet, out int consumed, expectedTag); 814public BigInteger ReadInteger(Asn1Tag? expectedTag = null) 816BigInteger ret = AsnDecoder.ReadInteger(_data, RuleSet, out int consumed, expectedTag);
System\Formats\Asn1\AsnDecoder.Oid.cs (3)
83out BigInteger? largeValue) 252ReadSubIdentifier(contents, out int bytesRead, out long? smallValue, out BigInteger? largeValue); 289BigInteger firstIdentifier = largeValue.Value;
System\Formats\Asn1\AsnWriter.Integer.cs (2)
60public void WriteInteger(BigInteger value, Asn1Tag? tag = null) 279private void WriteIntegerCore(Asn1Tag tag, BigInteger value)
System\Formats\Asn1\AsnWriter.Oid.cs (8)
116BigInteger subIdentifier = ParseSubIdentifier(ref remaining); 147private static BigInteger ParseSubIdentifier(ref ReadOnlySpan<char> oidValue) 160BigInteger value = BigInteger.Zero; 188private static int EncodeSubIdentifier(Span<byte> dest, ref BigInteger subIdentifier) 198BigInteger unencoded = subIdentifier; 203BigInteger cur = unencoded & 0x7F; 215while (unencoded != BigInteger.Zero);
System.Formats.Cbor (7)
System\Formats\Cbor\CborHelpers.netcoreapp.cs (2)
15public static BigInteger CreateBigIntegerFromUnsignedBigEndianBytes(byte[] bytes) 18public static byte[] CreateUnsignedBigEndianBytesFromBigInteger(BigInteger value)
System\Formats\Cbor\Reader\CborReader.Tag.cs (2)
153public BigInteger ReadBigInteger() 178BigInteger unsignedValue = CborHelpers.CreateBigIntegerFromUnsignedBigEndianBytes(unsignedBigEndianEncoding);
System\Formats\Cbor\Writer\CborWriter.Tag.cs (3)
88public void WriteBigInteger(BigInteger value) 91BigInteger unsignedValue = isUnsigned ? value : -1 - value; 127WriteBigInteger((BigInteger)mantissa);
System.Numerics (1)
System.Numerics.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.BigInteger))]
System.Runtime.Numerics (497)
System\Number.BigInteger.cs (30)
65internal static ParsingStatus TryParseBigInteger<TChar>(ReadOnlySpan<TChar> value, NumberStyles style, NumberFormatInfo info, out BigInteger result) 86internal static unsafe ParsingStatus TryParseBigIntegerNumber<TChar>(ReadOnlySpan<TChar> value, NumberStyles style, NumberFormatInfo info, out BigInteger result) 132internal static BigInteger ParseBigInteger<TChar>(ReadOnlySpan<TChar> value, NumberStyles style, NumberFormatInfo info) 140ParsingStatus status = TryParseBigInteger(value, style, info, out BigInteger result); 149internal static ParsingStatus TryParseBigIntegerHexOrBinaryNumberStyle<TParser, TChar>(ReadOnlySpan<TChar> value, NumberStyles style, out BigInteger result) 253if (totalUIntCount > BigInteger.MaxLength) 280if (bits.Length + 1 > BigInteger.MaxLength) 328private static ParsingStatus NumberToBigInteger(ref NumberBuffer number, out BigInteger result) 375base1E9 = BigInteger.RentedBuffer.Create(base1E9Length, out BigInteger.RentedBuffer base1E9Rental); 400Span<nuint> resultBuffer = BigInteger.RentedBuffer.Create(resultLength, out BigInteger.RentedBuffer resultRental); 432Span<nuint> leading = BigInteger.RentedBuffer.Create(leadingLength, out BigInteger.RentedBuffer leadingBuffer); 472scoped Span<nuint> buffer = BigInteger.RentedBuffer.Create(bufferLength, out BigInteger.RentedBuffer bufferRental); 571private static string? FormatBigIntegerToHex<TChar>(bool targetSpan, BigInteger value, char format, int digits, NumberFormatInfo info, Span<TChar> destination, out int charsWritten, out bool spanSuccess) 657private static string? FormatBigIntegerToBinary<TChar>(bool targetSpan, BigInteger value, int digits, Span<TChar> destination, out int charsWritten, out bool spanSuccess) 760internal static string FormatBigInteger(BigInteger value, string? format, NumberFormatInfo info) 765internal static bool TryFormatBigInteger<TChar>(BigInteger value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten) 772private static unsafe string? FormatBigInteger<TChar>(bool targetSpan, BigInteger value, string? formatString, ReadOnlySpan<char> formatSpan, NumberFormatInfo info, Span<TChar> destination, out int charsWritten, out bool spanSuccess) 833Debug.Assert(BigInteger.MaxLength * digitRatio + 1 < Array.MaxLength); // won't overflow 836Span<nuint> base1E9Buffer = BigInteger.RentedBuffer.Create(base1E9BufferLength, out BigInteger.RentedBuffer base1E9Rental); 1026Span<nuint> upper = BigInteger.RentedBuffer.Create(upperLength, out BigInteger.RentedBuffer upperBuffer); 1029Span<nuint> lower = BigInteger.RentedBuffer.Create(lowerLength, out BigInteger.RentedBuffer lowerBuffer); 1433Span<nuint> powersOfTen = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer powersOfTenBuffer);
System\Numerics\BigInteger.cs (386)
20IComparable<BigInteger>, 21IEquatable<BigInteger>, 22IBinaryInteger<BigInteger>, 23ISignedNumber<BigInteger>, 35/// Maximum number of limbs in a <see cref="BigInteger"/>. Restricts allocations to ~256MB, 59private static readonly BigInteger s_int32MinValue = new(-1, [UInt32HighBit]); 60private static readonly BigInteger s_one = new(1); 61private static readonly BigInteger s_zero = new(0); 62private static readonly BigInteger s_minusOne = new(-1); 689/// Initializes a new <see cref="BigInteger"/> from serialized data. 725/// Populates a <see cref="SerializationInfo"/> with the data needed to serialize the <see cref="BigInteger"/>. 765public static BigInteger Zero => s_zero; 767public static BigInteger One => s_one; 769public static BigInteger MinusOne => s_minusOne; 798public static BigInteger Parse(string value) 803public static BigInteger Parse(string value, NumberStyles style) 808public static BigInteger Parse(string value, IFormatProvider? provider) 813public static BigInteger Parse(string value, NumberStyles style, IFormatProvider? provider) 819public static bool TryParse([NotNullWhen(true)] string? value, out BigInteger result) 824public static bool TryParse([NotNullWhen(true)] string? value, NumberStyles style, IFormatProvider? provider, out BigInteger result) 829public static BigInteger Parse(ReadOnlySpan<char> value, NumberStyles style = NumberStyles.Integer, IFormatProvider? provider = null) 834public static BigInteger Parse(ReadOnlySpan<byte> utf8Text, NumberStyles style = NumberStyles.Integer, IFormatProvider? provider = null) 839public static bool TryParse(ReadOnlySpan<char> value, out BigInteger result) 844public static bool TryParse(ReadOnlySpan<char> value, NumberStyles style, IFormatProvider? provider, out BigInteger result) 849public static bool TryParse(ReadOnlySpan<byte> utf8Text, out BigInteger result) 854public static bool TryParse(ReadOnlySpan<byte> utf8Text, NumberStyles style, IFormatProvider? provider, out BigInteger result) 859public static int Compare(BigInteger left, BigInteger right) 864public static BigInteger Abs(BigInteger value) 869public static BigInteger Add(BigInteger left, BigInteger right) 874public static BigInteger Subtract(BigInteger left, BigInteger right) 879public static BigInteger Multiply(BigInteger left, BigInteger right) 884public static BigInteger Divide(BigInteger dividend, BigInteger divisor) 889public static BigInteger Remainder(BigInteger dividend, BigInteger divisor) 894public static BigInteger DivRem(BigInteger dividend, BigInteger divisor, out BigInteger remainder) 901BigInteger quotient; 948BigInteger result = new(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 957public static BigInteger Negate(BigInteger value) 962public static double Log(BigInteger value) 967public static double Log(BigInteger value, double baseValue) 1024public static double Log10(BigInteger value) 1029public static BigInteger GreatestCommonDivisor(BigInteger left, BigInteger right) 1062private static BigInteger GreatestCommonDivisor(ReadOnlySpan<nuint> leftBits, ReadOnlySpan<nuint> rightBits) 1066BigInteger result; 1098public static BigInteger Max(BigInteger left, BigInteger right) 1103public static BigInteger Min(BigInteger left, BigInteger right) 1108public static BigInteger ModPow(BigInteger value, BigInteger exponent, BigInteger modulus) 1116BigInteger result; 1159public static BigInteger Pow(BigInteger value, int exponent) 1176BigInteger result; 1230return obj is BigInteger other && Equals(other); 1293public bool Equals(BigInteger other) 1365public int CompareTo(BigInteger other) 1396obj is BigInteger bigInt ? CompareTo(bigInt) : 1871private static BigInteger Add(ReadOnlySpan<nuint> leftBits, int leftSign, ReadOnlySpan<nuint> rightBits, int rightSign) 1878BigInteger result; 1928public static BigInteger operator -(BigInteger left, BigInteger right) 1940private static BigInteger Subtract(ReadOnlySpan<nuint> leftBits, int leftSign, ReadOnlySpan<nuint> rightBits, int rightSign) 1947BigInteger result; 1999public static explicit operator byte(BigInteger value) => checked((byte)((int)value)); 2004public static explicit operator char(BigInteger value) => checked((char)((int)value)); 2006public static explicit operator decimal(BigInteger value) 2016public static explicit operator double(BigInteger value) 2068public static explicit operator Half(BigInteger value) => (Half)(double)value; 2073public static explicit operator BFloat16(BigInteger value) => (BFloat16)(double)value; 2075public static explicit operator short(BigInteger value) => checked((short)((int)value)); 2077public static explicit operator int(BigInteger value) 2104public static explicit operator long(BigInteger value) 2144public static explicit operator Int128(BigInteger value) 2193public static explicit operator nint(BigInteger value) => Environment.Is64BitProcess ? (nint)(long)value : (int)value; 2196public static explicit operator sbyte(BigInteger value) => checked((sbyte)((int)value)); 2198public static explicit operator float(BigInteger value) => (float)((double)value); 2201public static explicit operator ushort(BigInteger value) => checked((ushort)((int)value)); 2204public static explicit operator uint(BigInteger value) 2219public static explicit operator ulong(BigInteger value) 2247public static explicit operator UInt128(BigInteger value) 2287public static explicit operator nuint(BigInteger value) => Environment.Is64BitProcess ? (nuint)(ulong)value : (uint)value; 2293public static explicit operator BigInteger(decimal value) => new BigInteger(value); 2295public static explicit operator BigInteger(double value) => new BigInteger(value); 2300public static explicit operator BigInteger(Half value) => new BigInteger((float)value); 2305public static explicit operator BigInteger(BFloat16 value) => new BigInteger((float)value); 2310public static explicit operator BigInteger(Complex value) 2317return (BigInteger)value.Real; 2320public static explicit operator BigInteger(float value) => new BigInteger(value); 2326public static implicit operator BigInteger(byte value) => new BigInteger(value); 2331public static implicit operator BigInteger(char value) => new BigInteger(value); 2333public static implicit operator BigInteger(short value) => new BigInteger(value); 2335public static implicit operator BigInteger(int value) => new BigInteger(value); 2337public static implicit operator BigInteger(long value) => new BigInteger(value); 2342public static implicit operator BigInteger(Int128 value) 2410public static implicit operator BigInteger(nint value) => new BigInteger(value); 2413public static implicit operator BigInteger(sbyte value) => new BigInteger(value); 2416public static implicit operator BigInteger(ushort value) => new BigInteger(value); 2419public static implicit operator BigInteger(uint value) => new BigInteger(value); 2422public static implicit operator BigInteger(ulong value) => new BigInteger(value); 2428public static implicit operator BigInteger(UInt128 value) 2480public static implicit operator BigInteger(nuint value) => value <= int.MaxValue ? new BigInteger((int)value, null) : new BigInteger(+1, [value]); 2482public static BigInteger operator &(BigInteger left, BigInteger right) => 2484left._bits is null && right._bits is null ? (BigInteger)(left._sign & right._sign) : 2487public static BigInteger operator |(BigInteger left, BigInteger right) 2500? (BigInteger)(left._sign | right._sign) 2504public static BigInteger operator ^(BigInteger left, BigInteger right) => 2506? (BigInteger)(left._sign ^ right._sign) 2513private static BigInteger BitwiseAnd(ref readonly BigInteger left, ref readonly BigInteger right) 2532private static BigInteger BitwiseOr(ref readonly BigInteger left, ref readonly BigInteger right) 2542private static BigInteger BitwiseXor(ref readonly BigInteger left, ref readonly BigInteger right) 2549private static BigInteger BitwiseOp<TOp>(ref readonly BigInteger left, ref readonly BigInteger right, int zLen) 2559BigInteger result = new(z); 2566public static BigInteger operator <<(BigInteger value, int shift) 2624private static BigInteger LeftShift(int value, int digitShift, int smallShift) 2660public static BigInteger operator >>(BigInteger value, int shift) 2721BigInteger result = new(zd, neg); 2728public static BigInteger operator ~(BigInteger value) 2737BigInteger result; 2762public static BigInteger operator -(BigInteger value) => new BigInteger(-value._sign, value._bits); 2764public static BigInteger operator +(BigInteger value) => value; 2766public static BigInteger operator ++(BigInteger value) 2773BigInteger result; 2796public static BigInteger operator --(BigInteger value) 2803BigInteger result; 2826public static BigInteger operator +(BigInteger left, BigInteger right) 2838public static BigInteger operator *(BigInteger left, BigInteger right) => 2840? (BigInteger)((long)left._sign * right._sign) 2843private static BigInteger Multiply(ReadOnlySpan<nuint> left, int leftSign, ReadOnlySpan<nuint> right, int rightSign) 2850BigInteger result; 2898public static BigInteger operator /(BigInteger dividend, BigInteger divisor) 2925BigInteger result = new BigInteger(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 2944BigInteger result = new(quotient, (dividend._sign < 0) ^ (divisor._sign < 0)); 2952public static BigInteger operator %(BigInteger dividend, BigInteger divisor) 2987BigInteger result = new(bits, dividend._sign < 0); 2994public static bool operator <(BigInteger left, BigInteger right) => left.CompareTo(right) < 0; 2996public static bool operator <=(BigInteger left, BigInteger right) => left.CompareTo(right) <= 0; 2998public static bool operator >(BigInteger left, BigInteger right) => left.CompareTo(right) > 0; 3000public static bool operator >=(BigInteger left, BigInteger right) => left.CompareTo(right) >= 0; 3002public static bool operator ==(BigInteger left, BigInteger right) => left.Equals(right); 3004public static bool operator !=(BigInteger left, BigInteger right) => !left.Equals(right); 3006public static bool operator <(BigInteger left, long right) => left.CompareTo(right) < 0; 3008public static bool operator <=(BigInteger left, long right) => left.CompareTo(right) <= 0; 3010public static bool operator >(BigInteger left, long right) => left.CompareTo(right) > 0; 3012public static bool operator >=(BigInteger left, long right) => left.CompareTo(right) >= 0; 3014public static bool operator ==(BigInteger left, long right) => left.Equals(right); 3016public static bool operator !=(BigInteger left, long right) => !left.Equals(right); 3018public static bool operator <(long left, BigInteger right) => right.CompareTo(left) > 0; 3020public static bool operator <=(long left, BigInteger right) => right.CompareTo(left) >= 0; 3022public static bool operator >(long left, BigInteger right) => right.CompareTo(left) < 0; 3024public static bool operator >=(long left, BigInteger right) => right.CompareTo(left) <= 0; 3026public static bool operator ==(long left, BigInteger right) => right.Equals(left); 3028public static bool operator !=(long left, BigInteger right) => !right.Equals(left); 3031public static bool operator <(BigInteger left, ulong right) => left.CompareTo(right) < 0; 3034public static bool operator <=(BigInteger left, ulong right) => left.CompareTo(right) <= 0; 3037public static bool operator >(BigInteger left, ulong right) => left.CompareTo(right) > 0; 3040public static bool operator >=(BigInteger left, ulong right) => left.CompareTo(right) >= 0; 3043public static bool operator ==(BigInteger left, ulong right) => left.Equals(right); 3046public static bool operator !=(BigInteger left, ulong right) => !left.Equals(right); 3049public static bool operator <(ulong left, BigInteger right) => right.CompareTo(left) > 0; 3052public static bool operator <=(ulong left, BigInteger right) => right.CompareTo(left) >= 0; 3055public static bool operator >(ulong left, BigInteger right) => right.CompareTo(left) < 0; 3058public static bool operator >=(ulong left, BigInteger right) => right.CompareTo(left) <= 0; 3061public static bool operator ==(ulong left, BigInteger right) => right.Equals(left); 3064public static bool operator !=(ulong left, BigInteger right) => !right.Equals(left); 3137static BigInteger IAdditiveIdentity<BigInteger, BigInteger>.AdditiveIdentity => Zero; 3144static BigInteger IBinaryInteger<BigInteger>.Log10(BigInteger value) 3166BigInteger log2Value = Log2(value); 3167BigInteger approx = ((log2Value + 1) * 1292913986L) >> 32; 3168BigInteger power = Pow(10, (int)approx); 3174public static (BigInteger Quotient, BigInteger Remainder) DivRem(BigInteger left, BigInteger right) 3176BigInteger quotient = DivRem(left, right, out BigInteger remainder); 3181public static BigInteger LeadingZeroCount(BigInteger value) 3197public static BigInteger PopCount(BigInteger value) 3249public static BigInteger RotateLeft(BigInteger value, int rotateAmount) 3270public static BigInteger RotateRight(BigInteger value, int rotateAmount) 3290private static BigInteger Rotate(ReadOnlySpan<nuint> bits, bool negative, long rotateLeftAmount) 3336BigInteger result = new(zd, negative); 3344public static BigInteger TrailingZeroCount(BigInteger value) 3370static bool IBinaryInteger<BigInteger>.TryReadBigEndian(ReadOnlySpan<byte> source, bool isUnsigned, out BigInteger value) 3377static bool IBinaryInteger<BigInteger>.TryReadLittleEndian(ReadOnlySpan<byte> source, bool isUnsigned, out BigInteger value) 3384int IBinaryInteger<BigInteger>.GetShortestBitLength() 3421int IBinaryInteger<BigInteger>.GetByteCount() => GetGenericMathByteCount(); 3424bool IBinaryInteger<BigInteger>.TryWriteBigEndian(Span<byte> destination, out int bytesWritten) 3502bool IBinaryInteger<BigInteger>.TryWriteLittleEndian(Span<byte> destination, out int bytesWritten) 3617static BigInteger IBinaryNumber<BigInteger>.AllBitsSet => MinusOne; 3620public static bool IsPow2(BigInteger value) => value.IsPowerOfTwo; 3623public static BigInteger Log2(BigInteger value) 3631? (BigInteger)((BigIntegerCalculator.BitsPerLimb - 1) ^ BitOperations.LeadingZeroCount((nuint)value._sign | 1)) 3632: (BigInteger)(((long)value._bits.Length * BigIntegerCalculator.BitsPerLimb - 1) ^ BitOperations.LeadingZeroCount(value._bits[^1])); 3640static BigInteger IMultiplicativeIdentity<BigInteger, BigInteger>.MultiplicativeIdentity => One; 3647public static BigInteger Clamp(BigInteger value, BigInteger min, BigInteger max) 3673public static BigInteger CopySign(BigInteger value, BigInteger sign) 3693static BigInteger INumber<BigInteger>.MaxNumber(BigInteger x, BigInteger y) => Max(x, y); 3696static BigInteger INumber<BigInteger>.MinNumber(BigInteger x, BigInteger y) => Min(x, y); 3699static int INumber<BigInteger>.Sign(BigInteger value) 3711static int INumberBase<BigInteger>.Radix => 2; 3715public static BigInteger CreateChecked<TOther>(TOther value) 3718BigInteger result; 3720if (typeof(TOther) == typeof(BigInteger)) 3722result = (BigInteger)(object)value; 3734public static BigInteger CreateSaturating<TOther>(TOther value) 3737BigInteger result; 3739if (typeof(TOther) == typeof(BigInteger)) 3741result = (BigInteger)(object)value; 3753public static BigInteger CreateTruncating<TOther>(TOther value) 3756BigInteger result; 3758if (typeof(TOther) == typeof(BigInteger)) 3760result = (BigInteger)(object)value; 3771static bool INumberBase<BigInteger>.IsCanonical(BigInteger value) => true; 3774static bool INumberBase<BigInteger>.IsComplexNumber(BigInteger value) => false; 3777public static bool IsEvenInteger(BigInteger value) 3785static bool INumberBase<BigInteger>.IsFinite(BigInteger value) => true; 3788static bool INumberBase<BigInteger>.IsImaginaryNumber(BigInteger value) => false; 3791static bool INumberBase<BigInteger>.IsInfinity(BigInteger value) => false; 3794static bool INumberBase<BigInteger>.IsInteger(BigInteger value) => true; 3797static bool INumberBase<BigInteger>.IsNaN(BigInteger value) => false; 3800public static bool IsNegative(BigInteger value) 3806static bool INumberBase<BigInteger>.IsNegativeInfinity(BigInteger value) => false; 3809static bool INumberBase<BigInteger>.IsNormal(BigInteger value) => (value != 0); 3812public static bool IsOddInteger(BigInteger value) 3820public static bool IsPositive(BigInteger value) 3826static bool INumberBase<BigInteger>.IsPositiveInfinity(BigInteger value) => false; 3829static bool INumberBase<BigInteger>.IsRealNumber(BigInteger value) => true; 3832static bool INumberBase<BigInteger>.IsSubnormal(BigInteger value) => false; 3835static bool INumberBase<BigInteger>.IsZero(BigInteger value) 3841public static BigInteger MaxMagnitude(BigInteger x, BigInteger y) 3848static BigInteger INumberBase<BigInteger>.MaxMagnitudeNumber(BigInteger x, BigInteger y) => MaxMagnitude(x, y); 3851public static BigInteger MinMagnitude(BigInteger x, BigInteger y) 3858static BigInteger INumberBase<BigInteger>.MinMagnitudeNumber(BigInteger x, BigInteger y) => MinMagnitude(x, y); 3861static BigInteger INumberBase<BigInteger>.MultiplyAddEstimate(BigInteger left, BigInteger right, BigInteger addend) => (left * right) + addend; 3865static bool INumberBase<BigInteger>.TryConvertFromChecked<TOther>(TOther value, out BigInteger result) => TryConvertFromChecked(value, out result); 3868private static bool TryConvertFromChecked<TOther>(TOther value, out BigInteger result) 3886result = (BigInteger)actualValue; 3892result = checked((BigInteger)actualValue); 3898result = checked((BigInteger)actualValue); 3904result = checked((BigInteger)actualValue); 3946result = checked((BigInteger)actualValue); 3988static bool INumberBase<BigInteger>.TryConvertFromSaturating<TOther>(TOther value, out BigInteger result) => TryConvertFromSaturating(value, out result); 3991private static bool TryConvertFromSaturating<TOther>(TOther value, out BigInteger result) 4009result = (BigInteger)actualValue; 4015result = double.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4021result = Half.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4027result = BFloat16.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4069result = float.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4111static bool INumberBase<BigInteger>.TryConvertFromTruncating<TOther>(TOther value, out BigInteger result) => TryConvertFromTruncating(value, out result); 4114private static bool TryConvertFromTruncating<TOther>(TOther value, out BigInteger result) 4132result = (BigInteger)actualValue; 4138result = double.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4144result = Half.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4150result = BFloat16.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4192result = float.IsNaN(actualValue) ? Zero : (BigInteger)actualValue; 4234static bool INumberBase<BigInteger>.TryConvertToChecked<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result) 4359static bool INumberBase<BigInteger>.TryConvertToSaturating<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result) 4558static bool INumberBase<BigInteger>.TryConvertToTruncating<TOther>(BigInteger value, [MaybeNullWhen(false)] out TOther result) 4989public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out BigInteger result) => TryParse(s, NumberStyles.Integer, provider, out result); 4996public static BigInteger operator >>>(BigInteger value, int shiftAmount) 5105BigInteger result; 5132static BigInteger ISignedNumber<BigInteger>.NegativeOne => MinusOne; 5139public static BigInteger Parse(ReadOnlySpan<char> s, IFormatProvider? provider) => Parse(s, NumberStyles.Integer, provider); 5142public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out BigInteger result) => TryParse(s, NumberStyles.Integer, provider, out result); 5149public static BigInteger Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider) => Parse(utf8Text, NumberStyles.Integer, provider); 5152public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out BigInteger result) => TryParse(utf8Text, NumberStyles.Integer, provider, out result);
System\Numerics\BigInteger.RentedBuffer.cs (1)
14/// Provides temporary buffer management for <see cref="BigInteger"/> operations, using either stack-allocated inline storage or pooled arrays depending on size requirements.
System\Numerics\BigIntegerCalculator.DivRem.cs (24)
99Span<nuint> leftCopy = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer leftCopyBuffer); 131Span<nuint> quotient = BigInteger.RentedBuffer.Create(quotientLength, out BigInteger.RentedBuffer quotientBuffer); 163Span<nuint> leftCopy = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer leftCopyBuffer); 167Span<nuint> quotientAllocated = BigInteger.RentedBuffer.Create(quotientLength, out BigInteger.RentedBuffer quotientActualBuffer); 336Span<nuint> b = BigInteger.RentedBuffer.Create(n, out BigInteger.RentedBuffer bBuffer); 349Span<nuint> a = BigInteger.RentedBuffer.Create(aLength, out BigInteger.RentedBuffer aBuffer); 385Span<nuint> r = BigInteger.RentedBuffer.Create(n + 1, out BigInteger.RentedBuffer rBuffer); 387Span<nuint> z = BigInteger.RentedBuffer.Create(2 * n, out BigInteger.RentedBuffer zBuffer); 394Span<nuint> q = BigInteger.RentedBuffer.Create(n, out BigInteger.RentedBuffer qBuffer); 501Span<nuint> r1 = BigInteger.RentedBuffer.Create(left.Length, out BigInteger.RentedBuffer r1Buffer); 541Span<nuint> r1 = BigInteger.RentedBuffer.Create(right.Length + 1, out BigInteger.RentedBuffer r1Buffer); 566Span<nuint> d = BigInteger.RentedBuffer.Create(right.Length, out BigInteger.RentedBuffer dBuffer);
System\Numerics\BigIntegerCalculator.GcdInv.cs (2)
97Span<nuint> rightCopy = BigInteger.RentedBuffer.Create(right.Length, out BigInteger.RentedBuffer rightCopyBuffer);
System\Numerics\BigIntegerCalculator.PowMod.cs (30)
25Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer); 27Span<nuint> valueCopy = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer valueCopyBuffer); 267Span<nuint> valueCopy = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer valueCopyBuffer); 283Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer); 307Span<nuint> valueCopy = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer valueCopyBuffer); 323Span<nuint> temp = BigInteger.RentedBuffer.Create(bits.Length, out BigInteger.RentedBuffer tempBuffer); 392Span<nuint> r = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer rBuffer); 395Span<nuint> mu = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer muBuffer); 398Span<nuint> q1 = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer q1Buffer); 400Span<nuint> q2 = BigInteger.RentedBuffer.Create(size, out BigInteger.RentedBuffer q2Buffer); 496Span<nuint> shifted = BigInteger.RentedBuffer.Create(shiftLen, out BigInteger.RentedBuffer shiftedBuffer); 511Span<nuint> rModN = BigInteger.RentedBuffer.Create(k, out BigInteger.RentedBuffer rModNBuffer); 514Span<nuint> oneShifted = BigInteger.RentedBuffer.Create(oneShiftLen, out BigInteger.RentedBuffer oneShiftedBuffer); 563Span<nuint> prod = BigInteger.RentedBuffer.Create(bufLen, out BigInteger.RentedBuffer prodBuffer); 566Span<nuint> base2 = BigInteger.RentedBuffer.Create(k, out BigInteger.RentedBuffer base2Buffer);
System\Numerics\BigIntegerCalculator.ShiftRot.cs (2)
84Span<nuint> tmp = BigInteger.RentedBuffer.Create(tmpLength, out BigInteger.RentedBuffer tmpBuffer);
System\Numerics\BigIntegerCalculator.SquMul.cs (12)
123Span<nuint> fold = BigInteger.RentedBuffer.Create(foldLength, out BigInteger.RentedBuffer foldBuffer); 126Span<nuint> core = BigInteger.RentedBuffer.Create(coreLength, out BigInteger.RentedBuffer coreBuffer); 452Span<nuint> leftFold = BigInteger.RentedBuffer.Create(foldLength, out BigInteger.RentedBuffer leftFoldBuffer); 454Span<nuint> rightFold = BigInteger.RentedBuffer.Create(foldLength, out BigInteger.RentedBuffer rightFoldBuffer); 463Span<nuint> core = BigInteger.RentedBuffer.Create(coreLength, out BigInteger.RentedBuffer coreBuffer); 504Span<nuint> carry = BigInteger.RentedBuffer.Create(carryLength, out BigInteger.RentedBuffer carryBuffer);
System\Numerics\Complex.cs (10)
791public static explicit operator Complex(BigInteger value) 1749else if (typeof(TOther) == typeof(BigInteger)) 1756BigInteger actualResult = checked((BigInteger)value.m_real); 1928else if (typeof(TOther) == typeof(BigInteger)) 1930BigInteger actualResult = (BigInteger)value.m_real; 2070else if (typeof(TOther) == typeof(BigInteger)) 2072BigInteger actualResult = (BigInteger)value.m_real;
System.Security.Cryptography (33)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DssParms.xml.cs (3)
14internal System.Numerics.BigInteger P; 15internal System.Numerics.BigInteger Q; 16internal System.Numerics.BigInteger G;
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (4)
28BigInteger x; 80BigInteger y = BigInteger.ModPow(parms.G, x, parms.P); 94BigInteger y;
System\Security\Cryptography\KeyBlobHelpers.cs (1)
40internal static byte[] ExportKeyParameter(this BigInteger value, int length)
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestInfoAsn.xml.cs (2)
15internal System.Numerics.BigInteger Version; 139internal System.Numerics.BigInteger Version;
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (4)
111BigInteger crlNumber, 128BigInteger crlNumber, 310BigInteger crlNumber, 329BigInteger crlNumber,
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Load.cs (6)
43public static CertificateRevocationListBuilder Load(byte[] currentCrl, out BigInteger currentCrlNumber) 49out BigInteger crlNumber, 85out BigInteger currentCrlNumber, 89BigInteger crlNumber = 0; 231public static CertificateRevocationListBuilder LoadPem(string currentCrl, out BigInteger currentCrlNumber) 266public static CertificateRevocationListBuilder LoadPem(ReadOnlySpan<char> currentCrl, out BigInteger currentCrlNumber)
System\Security\Cryptography\X509Certificates\FindPal.cs (8)
95BigInteger hexValue = new BigInteger(hexBytes, isUnsigned: true, isBigEndian: true); 96BigInteger decimalValue = LaxParseDecimalBigInteger(decimalOrHexString); 243private static BigInteger LaxParseDecimalBigInteger(string decimalString) 245BigInteger ten = new BigInteger(10); 246BigInteger accum = BigInteger.Zero; 252accum = BigInteger.Multiply(accum, ten); 253accum = BigInteger.Add(accum, c - '0');
System\Security\Cryptography\X509Certificates\IFindPal.cs (2)
17void FindBySerialNumber(BigInteger hexValue, BigInteger decimalValue);
System\Security\Cryptography\X509Certificates\ManagedCertificateFinder.cs (3)
99public void FindBySerialNumber(BigInteger hexValue, BigInteger decimalValue) 106BigInteger serialNumber = new BigInteger(serialBytes, isUnsigned: true);
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
183=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg)));
System.Security.Cryptography.Pkcs (1)
System\Security\Cryptography\Pkcs\CmsSignature.cs (1)
244BigInteger val = new BigInteger(
System.Security.Cryptography.Xml (3)
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (3)
161BigInteger h; 162if (!BigInteger.TryParse(serialNumber, NumberStyles.AllowHexSpecifier, NumberFormatInfo.CurrentInfo, out h)) 167if (h < BigInteger.Zero)