From a9e588bd1a90175f411c7bda93969a9bec090af7 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sun, 11 Aug 2013 18:26:11 +0200 Subject: Finishing up the BigInt class. --- includes/BigInt.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'includes/BigInt.h') diff --git a/includes/BigInt.h b/includes/BigInt.h index a74df6e..a7f5a76 100644 --- a/includes/BigInt.h +++ b/includes/BigInt.h @@ -70,6 +70,22 @@ class BigInt { bool operator<(const BigInt &) const; bool operator>(const BigInt &) const; + BigInt modadd(const BigInt & a, const BigInt & m) const throw (GeneralException); + BigInt modsub(const BigInt & a, const BigInt & m) const throw (GeneralException); + BigInt modmul(const BigInt & a, const BigInt & m) const throw (GeneralException); + BigInt modsqr(const BigInt & m) const throw (GeneralException); + BigInt modinv(const BigInt & m) const throw (GeneralException); + BigInt modpow(const BigInt & a, const BigInt & m) const throw (GeneralException); + + BigInt & do_modadd(const BigInt & a, const BigInt & m) throw (GeneralException); + BigInt & do_modsub(const BigInt & a, const BigInt & m) throw (GeneralException); + BigInt & do_modmul(const BigInt & a, const BigInt & m) throw (GeneralException); + BigInt & do_modsqr(const BigInt & m) throw (GeneralException); + BigInt & do_modinv(const BigInt & m) throw (GeneralException); + BigInt & do_modpow(const BigInt & a, const BigInt & m) throw (GeneralException); + + bool isPrime() const; + String toString(int radix = 10) const; char * makeString(int radix = 10) const; -- cgit v1.2.3