<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0-beta.98" />

BigIntegers

public static class BigIntegers
public static readonly BigInteger One

public static readonly BigInteger Zero

public static void AsUint32ArrayLittleEndian(BigInteger n, Span<uint> buf)

public static byte[] AsUnsignedByteArray(BigInteger n)

public static byte[] AsUnsignedByteArray(int length, BigInteger n)

public static void AsUnsignedByteArray(BigInteger n, byte[] buf, int off, int len)

public static void AsUnsignedByteArray(BigInteger n, Span<byte> buf)

public static BigInteger CreateRandomBigInteger(int bitLength, SecureRandom secureRandom)

Creates a Random BigInteger from the secure random of a given bit length.

public static BigInteger FromUnsignedByteArray(byte[] buf)

public static BigInteger FromUnsignedByteArray(byte[] buf, int off, int length)

public static int GetByteLength(BigInteger n)

public static int GetUnsignedByteLength(BigInteger n)

public static bool ModOddIsCoprime(BigInteger M, BigInteger X)

public static bool ModOddIsCoprimeVar(BigInteger M, BigInteger X)

public static void WriteUnsignedByteArray(Stream outStr, BigInteger n)