RInteger Class Reference
class RInteger : public TInteger |
A TInteger derived class allowing the construction of variable length big integers. See the Cryptography API guide for further information.
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) |
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.
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 Functions 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.
Parameters
TAny * 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.
Parameters
TUint aNumWords | The number of words for to preallocated and zero fill. |
NewL(void)
Creates a new integer representing 0.
NewL(const TDesC8 &)
Creates a new integer object representing a specified value.
Parameters
const TDesC8 & aValue | A descriptor containing the big-endian binary representation of the value. |
NewL(const TInteger &)
Creates an exact copy of an aInteger object.
Parameters
const TInteger & aInteger | The integer you wish to copy |
NewL(TInt)
Creates a new integer from the value represented by aInteger.
Parameters
TInt aInteger | A signed word sized integer. |
NewL(TUint)
Creates a new integer from the value represented by aInteger.
Parameters
TUint aInteger | An unsigned word sized integer. |
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.
Parameters
TUint aBits | The number of bits you wish to randomly select your prime from. |
TRandomAttribute aAttr = EAllBitsRandom | Enum specifying whether specific bits in the random number should be set. See TRandomAttribute for more information. |
NewRandomL(TUint, TRandomAttribute)
Creates a random integer uniformly distributed over [0, 2^aBits].
Parameters
TUint aBits | The number of bits you wish to randomly select. |
TRandomAttribute aAttr = EAllBitsRandom | Enum specifying whether specific bits in the random number should be set. See TRandomAttribute for more information. |
NewRandomL(const TInteger &, const TInteger &)
Creates a random integer uniformly distributed over [x | min <= x <= max].
Parameters
const TInteger & aMin | The smallest possible value for the random integer (inclusive). |
const TInteger & aMax | The largest possible value for the random integer (inclusive). |
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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.