BigIntHelper

Undocumented in source.

Members

Aliases

powmod
alias powmod = std.bigint.powmod

Undocumented in source.

Static functions

fromBytes
BigInt fromBytes(ubyte[] buffer)

Create a BigInt from an array representing a magnitude, most significant element first.

isProbablePrime
bool isProbablePrime(BigInt n, size_t confidence)

Test whether BigInt n is prime. Step 1: millerRabinPrimeTest Step 2: lucasLehmerTest

powmod
BigInt powmod(BigInt base, BigInt exponent, BigInt modulus)
randomGenerate
BigInt randomGenerate(uint bitLength, int highBit, int lowBit)

Random generate a BigInt by bitLength.

randomGenerate
BigInt randomGenerate(BigInt min, BigInt max)

Random generate a BigInt between min and max.

toUBytes
ubyte[] toUBytes(BigInt value)

Meta