From 5e14e11c3c21c7bd04b156f1df8e8c866509bc4a Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 20 Feb 2008 13:53:17 +0000 Subject: cleanups key derivation could work now --- mpi.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'mpi.h') diff --git a/mpi.h b/mpi.h index 27c02da..70f6681 100644 --- a/mpi.h +++ b/mpi.h @@ -51,21 +51,17 @@ public: Mpi(u_int8_t length); Mpi(const Mpi &src); Mpi(const u_int8_t * src, u_int32_t len); + void operator=(const Mpi &src); - void operator=(long unsigned int); + void operator=(u_int32_t src); Mpi operator+(const Mpi &b) const; - Mpi operator+(const long unsigned int &b) const; + Mpi operator+(const u_int32_t &b) const; + Mpi operator*(const u_int32_t n) const; + Mpi operator/(const Mpi &b) const; + Mpi operator^(const Mpi &b) const; - Mpi operator*(const unsigned long int n) const; - /** - * shift the bits to the right - * (LSB on the right side) - * @param n number of bits to shift - */ - void rShift(u_int8_t n); // LSB on the right side! Mpi mul2exp(u_int32_t e) const; // value * 2^e - void clearHighBit(u_int32_t n); /** * returns a new[] u_int8_t* buffer with the MPI value in the @@ -75,7 +71,8 @@ public: * @return a byte buffer of size buf_len */ u_int8_t *getNewBuf(u_int32_t buf_len) const; - u_int32_t getLen() const; + std::string getHexDump() const; + u_int32_t getLength() const; protected: gcry_mpi_t val_; -- cgit v1.2.3