summaryrefslogtreecommitdiff
path: root/mpi.cpp
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-11 16:44:04 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-11 16:44:04 +0000
commit88af1429cb358f840a5aae553bee5ed886888243 (patch)
tree5362a239f8c62621d6959d219b37126833180592 /mpi.cpp
parent* added mpi operator (diff)
kd iv generation fix again
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 8d35bb8..b8a4b6c 100644
--- a/mpi.cpp
+++ b/mpi.cpp
@@ -108,6 +108,8 @@ Mpi Mpi::operator^(const Mpi &b) const
return res;
}
+// bit manipulation
+
void Mpi::rShift(u_int8_t n)
{
gcry_mpi_rshift(val_, val_, n);
@@ -120,6 +122,11 @@ Mpi Mpi::mul2exp(u_int32_t e) const
return res;
}
+void Mpi::clearHighBit(u_int32_t n)
+{
+ gcry_mpi_clear_highbit( val_, n );
+}
+
Buffer Mpi::getBuf() const
{
u_int32_t len = 0, written = 0;