Can anyone provide code for a BigInteger implementation in objective-c that provides a PowMod function ?
Can anyone provide code for a BigInteger implementation in objective-c that provides a PowMod function ?
The closest builtin class in the Cocoa libraries is NSDecimalNumber which provides base-10 arithmetic (and so can handle integer-only arithmetic) for the range mantissa x 10^exponent where mantissa is a 38-bit float and exponent is -128 to 128. If that covers the range you need, there are multiplication and power methods. Otherwise, since Objective-C is a superset of C, any C implementation of bigint that you can find will suffice.