MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TaoCrypt::Integer Class Reference

Classes

class  DivideByZero

Public Types

enum  Sign { POSITIVE = 0, NEGATIVE = 1 }
enum  Signedness { UNSIGNED, SIGNED }
enum  RandomNumberType { ANY, PRIME }

Public Member Functions

 Integer (const Integer &t)
 Integer (signed long value)
 Integer (Sign s, word highWord, word lowWord)
 Integer (Source &)
 Integer (const byte *encodedInteger, unsigned int byteCount, Signedness s=UNSIGNED)
IntegerRef ()
 Integer (RandomNumberGenerator &rng, const Integer &min, const Integer &max)
unsigned int MinEncodedSize (Signedness=UNSIGNED) const
unsigned int Encode (byte *output, unsigned int outputLen, Signedness=UNSIGNED) const
void Decode (const byte *input, unsigned int inputLen, Signedness=UNSIGNED)
void Decode (Source &)
bool IsConvertableToLong () const
signed long ConvertToLong () const
unsigned int BitCount () const
unsigned int ByteCount () const
unsigned int WordCount () const
bool GetBit (unsigned int i) const
byte GetByte (unsigned int i) const
unsigned long GetBits (unsigned int i, unsigned int n) const
bool IsZero () const
bool NotZero () const
bool IsNegative () const
bool NotNegative () const
bool IsPositive () const
bool NotPositive () const
bool IsEven () const
bool IsOdd () const
Integeroperator= (const Integer &t)
Integeroperator+= (const Integer &t)
Integeroperator-= (const Integer &t)
Integeroperator*= (const Integer &t)
Integeroperator/= (const Integer &t)
Integeroperator%= (const Integer &t)
Integeroperator/= (word t)
Integeroperator%= (word t)
Integeroperator<<= (unsigned int)
Integeroperator>>= (unsigned int)
void Randomize (RandomNumberGenerator &rng, unsigned int bitcount)
void Randomize (RandomNumberGenerator &rng, const Integer &min, const Integer &max)
void SetBit (unsigned int n, bool value=1)
void SetByte (unsigned int n, byte value)
void Negate ()
void SetPositive ()
void SetNegative ()
void Swap (Integer &a)
bool operator! () const
Integer operator+ () const
Integer operator- () const
Integeroperator++ ()
Integeroperator-- ()
Integer operator++ (int)
Integer operator-- (int)
int Compare (const Integer &a) const
Integer Plus (const Integer &b) const
Integer Minus (const Integer &b) const
Integer Times (const Integer &b) const
Integer DividedBy (const Integer &b) const
Integer Modulo (const Integer &b) const
Integer DividedBy (word b) const
word Modulo (word b) const
Integer operator>> (unsigned int n) const
Integer operator<< (unsigned int n) const
Integer AbsoluteValue () const
Integer Doubled () const
Integer Squared () const
Integer SquareRoot () const
bool IsSquare () const
bool IsUnit () const
Integer MultiplicativeInverse () const
Integer InverseMod (const Integer &n) const
word InverseMod (word n) const

Static Public Member Functions

static const IntegerZero ()
static const IntegerOne ()
static Integer Power2 (unsigned int e)
static void Divide (Integer &r, Integer &q, const Integer &a, const Integer &d)
static void Divide (word &r, Integer &q, const Integer &a, word d)
static void DivideByPowerOf2 (Integer &r, Integer &q, const Integer &a, unsigned int n)
static Integer Gcd (const Integer &a, const Integer &n)

Friends

class ModularArithmetic
class MontgomeryRepresentation
Integer a_times_b_mod_c (const Integer &x, const Integer &y, const Integer &m)
Integer a_exp_b_mod_c (const Integer &x, const Integer &e, const Integer &m)
void PositiveAdd (Integer &sum, const Integer &a, const Integer &b)
void PositiveSubtract (Integer &diff, const Integer &a, const Integer &b)
void PositiveMultiply (Integer &product, const Integer &a, const Integer &b)
void PositiveDivide (Integer &remainder, Integer &quotient, const Integer &dividend, const Integer &divisor)

Detailed Description

Definition at line 123 of file integer.hpp.


The documentation for this class was generated from the following files: