summaryrefslogtreecommitdiff
path: root/includes/BigInt.h
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-11 18:26:11 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-11 18:26:11 +0200
commita9e588bd1a90175f411c7bda93969a9bec090af7 (patch)
treec912f15f43be3d32fb447a91982c0dddaffc595b /includes/BigInt.h
parent5f866c4a4b44d39b827a99d82006fa2d375c0ba9 (diff)
Finishing up the BigInt class.
Diffstat (limited to 'includes/BigInt.h')
-rw-r--r--includes/BigInt.h16
1 files changed, 16 insertions, 0 deletions
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;