RInteger Class Reference
class RInteger : public TInteger |
Inherited Functions |
---|
| TInteger::Bit(TUint)const |
| TInteger::BitCount(void)const |
| TInteger::BufferLC()const |
| TInteger::BufferWithNoTruncationLC()const |
| TInteger::ByteCount(void)const |
| TInteger::CleanGrowL(TUint) |
| TInteger::CleanNewL(TUint) |
| TInteger::CleanResizeL(TUint) |
| TInteger::Construct(TInt) |
| TInteger::Construct(TUint) |
| TInteger::Construct(const TDesC8 &) |
| TInteger::Construct(const TInteger &) |
| TInteger::ConstructStack(TUint,TUint) |
| TInteger::ConstructStack(TUint,const TInteger &) |
| TInteger::ConvertToLong(void)const |
| TInteger::ConvertToLongL(void)const |
| TInteger::ConvertToUnsignedLong(void)const |
| TInteger::CopyL(const TInt,TBool) |
| TInteger::CopyL(const TInteger &,TBool) |
| TInteger::CreateNewL(TUint) |
| TInteger::DivideL(RInteger &,RInteger &,const TInteger &,const TInteger &)const |
| TInteger::DivideL(TUint &,RInteger &,const TInteger &,TUint)const |
| TInteger::DividedByL(TUint)const |
| TInteger::DividedByL(const TInteger &)const |
| TInteger::ExponentiateL(const TInteger &)const |
| TInteger::GCDL(const TInteger &)const |
| TInteger::InverseModL(const TInteger &)const |
| TInteger::IsConvertableToLong(void)const |
| TInteger::IsEven()const |
| TInteger::IsHeapBased(void)const |
| TInteger::IsNegative()const |
| TInteger::IsOdd()const |
| TInteger::IsPositive()const |
| TInteger::IsPrimeL(void)const |
| TInteger::IsStackBased(void)const |
| TInteger::IsZero()const |
| TInteger::MinusL(const TInteger &)const |
| TInteger::ModularExponentiateL(const TInteger &,const TInteger &,const TInteger &) |
| TInteger::ModularMultiplyL(const TInteger &,const TInteger &,const TInteger &) |
| TInteger::Modulo(const TInteger &,TUint)const |
| TInteger::ModuloL(TUint)const |
| TInteger::ModuloL(const TInteger &)const |
| TInteger::Negate(void) |
| TInteger::NotNegative()const |
| TInteger::NotPositive()const |
| TInteger::NotZero()const |
| TInteger::One(void) |
| TInteger::PlusL(const TInteger &)const |
| TInteger::PositiveAddL(const TInteger &,const TInteger &)const |
| TInteger::PositiveDivide(TUint &,TInteger &,const TInteger &,TUint)const |
| TInteger::PositiveDivideL(RInteger &,RInteger &,const TInteger &,const TInteger &)const |
| TInteger::PositiveMultiplyL(const TInteger &,const TInteger &)const |
| TInteger::PositiveSubtractL(const TInteger &,const TInteger &)const |
| TInteger::PrimeRandomizeL(TUint,TRandomAttribute) |
| TInteger::Ptr(void)const |
| TInteger::RandomizeL(TUint,TRandomAttribute) |
| TInteger::RandomizeL(const TInteger &,const TInteger &) |
| TInteger::Set(const RInteger &) |
| TInteger::SetBit(TUint) |
| TInteger::SetHeapBased(void) |
| TInteger::SetPtr(TUint *) |
| TInteger::SetSign(TSign) |
| TInteger::SetSize(TUint) |
| TInteger::SetStackBased(void) |
| TInteger::Sign(void)const |
| TInteger::SignedCompare(TInt)const |
| TInteger::SignedCompare(const TInteger &)const |
| TInteger::Size(void)const |
| TInteger::SmallPrimeRandomizeL(void) |
| TInteger::SquaredL(void)const |
| TInteger::TInteger(void) |
| TInteger::TimesL(const TInteger &)const |
| TInteger::Two(void) |
| TInteger::UnsignedCompare(const TInteger &)const |
| TInteger::WordCount(void)const |
| TInteger::Zero(void) |
| TInteger::operator!()const |
| TInteger::operator!=(TInt)const |
| TInteger::operator!=(const TInteger &)const |
| TInteger::operator%=(TInt) |
| TInteger::operator%=(const TInteger &) |
| TInteger::operator*=(TInt) |
| TInteger::operator*=(const TInteger &) |
| TInteger::operator++() |
| TInteger::operator+=(TInt) |
| TInteger::operator+=(const TInteger &) |
| TInteger::operator--() |
| TInteger::operator-=(TInt) |
| TInteger::operator-=(const TInteger &) |
| TInteger::operator/=(TInt) |
| TInteger::operator/=(const TInteger &) |
| TInteger::operator<(TInt)const |
| TInteger::operator<(const TInteger &)const |
| TInteger::operator<<=(TUint) |
| TInteger::operator<=(TInt)const |
| TInteger::operator<=(const TInteger &)const |
| TInteger::operator==(TInt)const |
| TInteger::operator==(const TInteger &)const |
| TInteger::operator>(TInt)const |
| TInteger::operator>(const TInteger &)const |
| TInteger::operator>=(TInt)const |
| TInteger::operator>=(const TInteger &)const |
| TInteger::operator>>=(TUint) |
Detailed Description
A TInteger derived class allowing the construction of variable length big integers. See the Cryptography API guide for further information.
See also: TInteger
Constructor & Destructor Documentation
RInteger ( void )
Creates an RInteger object with no associated internal (heap) storage.
All data members are initialised to zero. It is safe (although not strictly necessary) to push such an RInteger object onto the CleanupStack. This is useful, for example, if you want to pass an RInteger object by reference into a function and have it create the representation of the actual integer for you.
Note that performing any operation on such an RInteger object other than the default assignment operator or copy constructor will panic your code.
Returns: A stack based class that has no associated internal storage and thus does not represent any number.
RInteger ( const RInteger & )
IMPORT_C | RInteger | ( | const RInteger & | aInteger | ) | |
Copy constructor
This function performs a shallow copy, i.e. the memory holding the integer is not copied.
Member Function Documentation
CallClose ( TAny * )
IMPORT_C void | CallClose | ( | TAny * | aPtr | ) | [static] |
Helper function registered with the cleanup stack that just calls Close() for this RInteger object.
Parameter | Description | aPtr | A pointer to the object for which clean-up is to be performed. |
Close ( void )
Zeros and then frees any memory owned by this RInteger object.
An RInteger object that has been closed can safely fall off the stack.
NewEmptyL ( TUint )
Creates a new integer with a preallocated internal storage of aNumWords all initialised to zero.
The resulting RInteger object is logically equivalent to RInteger::NewL(0). The only difference is that the internal storage requirements have been specified to be larger than the default. This is useful if you are about to perform an operation on this integer, that you know the resulting size requirements of, and wish to avoid a heap resize.
Parameter | Description | aNumWords | The number of words for to preallocated and zero fill. |
Returns: An RInteger object representing 0 with a preallocated zero-filled internal storage of aNumWords.
NewL ( void )
Creates a new integer representing 0.
Returns: An RInteger by value.
NewL ( const TDesC8 & )
Creates a new integer object representing a specified value.
Parameter | Description | aValue | A descriptor containing the big-endian binary representation of the value. |
Returns: An RInteger object representing the value.
NewL ( const TInteger & )
Creates an exact copy of an aInteger object.
Parameter | Description | aInteger | The integer you wish to copy |
Returns: An RInteger object representing an exact copy of aInteger by value.
NewL ( TInt )
Creates a new integer from the value represented by aInteger.
Parameter | Description | aInteger | A signed word sized integer. |
Returns: An RInteger representation of aInteger by value.
NewL ( TUint )
Creates a new integer from the value represented by aInteger.
Parameter | Description | aInteger | An unsigned word sized integer. |
Returns: An RInteger representation of aInteger by value.
NewPrimeL ( TUint, TRandomAttribute )
Finds a random prime integer in the range of [2, 2^aBits].
This is done by picking a random integer and using that as a starting point for a sequential search for a prime. To verify the primality of number, this algorithm uses a probablistic primality test. This means that it is possible, although extremely improbable, that the number returned is a pseudoprime.
Parameter | Description | aBits | The number of bits you wish to randomly select your prime from. |
aAttr | Enum specifying whether specific bits in the random number should be set. See TRandomAttribute for more information. |
Returns: A random RInteger representing a probable prime (with very high probablity) in the range specified.
NewRandomL ( TUint, TRandomAttribute )
Creates a random integer uniformly distributed over [0, 2^aBits].
Parameter | Description | aBits | The number of bits you wish to randomly select. |
aAttr | Enum specifying whether specific bits in the random number should be set. See TRandomAttribute for more information. |
Returns: A random RInteger object in the range specified.
NewRandomL ( const TInteger &, const TInteger & )
Creates a random integer uniformly distributed over [x | min <= x <= max].
Parameter | Description | aMin | The smallest possible value for the random integer (inclusive). |
aMax | The largest possible value for the random integer (inclusive). |
Returns: A random RInteger object in the range specified.
operator TCleanupItem ( )
IMPORT_C | operator TCleanupItem | ( | ) | |
An overloaded TCleanupItem() allowing the RIntegers to be pushed, popped, and destroyed via the CleanupStack like any other CBase derived object.
operator= ( const RInteger & )
Assignment operator
This function performs a shallow copy, i.e. the memory holding the integer is not copied.