powmod

fnBigInt powmod(BigInt base, BigInt exponent, BigInt modulus) pure nothrow @safe

Fast power modulus calculation for BigInt operands.

Parameters

basethe BigInt is basic operands.
exponentthe BigInt is power exponent of base.
modulusthe BigInt is modules to be modular of base ^ exponent.

Returns

The power modulus value of (base ^ exponent) % modulus.