summaryrefslogtreecommitdiff
path: root/mpi.cpp
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-11 16:35:07 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-11 16:35:07 +0000
commitb6f796adf863d1800c03bc2519108a9ea6f532bf (patch)
tree5ce09d8e0f1270b1f9d50f935f90dc3b8d14d765 /mpi.cpp
parentreplay protection works again (diff)
* added mpi operator
* kd iv generation fix
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;