• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

mse::BigInt

mse::BigInt Class Reference

#include <bigint.h>

List of all members.


Detailed Description

Author:
Joris Guisson <joris.guisson@gmail.com>

Class which can hold an arbitrary large integer. This will be a very important part of our MSE implementation.

Definition at line 42 of file bigint.h.


Public Member Functions

 BigInt (const BigInt &bi)
 BigInt (const QString &value)
 BigInt (Uint32 num_bits=0)
BigInt & operator= (const BigInt &bi)
Uint32 toBuffer (Uint8 *buf, Uint32 max_size) const
virtual ~BigInt ()

Static Public Member Functions

static BigInt fromBuffer (const Uint8 *buf, Uint32 size)
static BigInt powerMod (const BigInt &x, const BigInt &e, const BigInt &d)
static BigInt random ()

Constructor & Destructor Documentation

mse::BigInt::BigInt ( Uint32  num_bits = 0  ) 

Create a big integer, with num_bits bits.

All bits will be set to 0.

Parameters:
num_bits The number of bits

mse::BigInt::BigInt ( const QString &  value  ) 

Create a big integer of a string.

The string must be a hexadecimal representation of an integer. For example : 12AFFE123488BBBE123

Letters can be upper or lower case. Invalid chars will create an invalid number.

Parameters:
value The hexadecimal representation of the number

Definition at line 38 of file bigint.cpp.

mse::BigInt::BigInt ( const BigInt &  bi  ) 

Copy constructor.

Parameters:
bi BigInt to copy

Definition at line 44 of file bigint.cpp.

mse::BigInt::~BigInt (  )  [virtual]

Definition at line 49 of file bigint.cpp.


Member Function Documentation

static BigInt mse::BigInt::fromBuffer ( const Uint8 *  buf,
Uint32  size 
) [static]

Make a BigInt out of a buffer.

BigInt & mse::BigInt::operator= ( const BigInt &  bi  ) 

Assignment operator.

Parameters:
bi The BigInt to copy
Returns:
*this

Definition at line 55 of file bigint.cpp.

BigInt mse::BigInt::powerMod ( const BigInt &  x,
const BigInt &  e,
const BigInt &  d 
) [static]

Calculates (x ^ e) mod d ^ is power.

Definition at line 61 of file bigint.cpp.

BigInt mse::BigInt::random (  )  [static]

Make a random BigInt.

Definition at line 68 of file bigint.cpp.

Uint32 mse::BigInt::toBuffer ( Uint8 *  buf,
Uint32  max_size 
) const

Export the bigint ot a buffer.


The documentation for this class was generated from the following files:
  • bigint.h
  • bigint.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal