Archived:Creating Random Numbers in Symbian
Random value generation in Symbian C++ can be done with the TRandom API. This calls into the OS to gen a pseudo random number stream based on the size of the supplied descriptor
This snippet can be self-signed.
The following libraries are required:
int main (void)
// if we want 10 random bytes of data..
prngData.SetLength( prngData.MaxLength() );
// prngData now has the random data in it.
// Of course HBufC8* could be used to reduce stack space
10 random numbers are generated