summaryrefslogtreecommitdiff
path: root/mpi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mpi.cpp')
-rw-r--r--mpi.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/mpi.cpp b/mpi.cpp
index 5e094ae..8d35bb8 100644
--- a/mpi.cpp
+++ b/mpi.cpp
@@ -74,6 +74,13 @@ Mpi Mpi::operator+(const Mpi &b) const
return res;
}
+Mpi Mpi::operator+(const long unsigned int &b) const
+{
+ Mpi res;
+ gcry_mpi_add_ui(res.val_, val_, b);
+ return res;
+}
+
Mpi Mpi::operator*(const unsigned long int n) const
{
Mpi res;