version 1.8.6.1, 2003/07/29 15:08:30
|
version 1.11, 2003/10/08 23:06:52
|
|
|
System::getCurrentTime( sec, milliSec ); | System::getCurrentTime( sec, milliSec ); |
| |
srand( (int) sec ); | srand( (int) sec ); |
|
#ifdef PEGASUS_PLATFORM_SOLARIS_SPARC |
|
Unit32 seed; |
|
randNum = rand_r(*seed); |
|
#else |
randNum = rand(); | randNum = rand(); |
|
#endif |
| |
// | // |
// Make sure the random number generated is between 0-63. | // Make sure the random number generated is between 0-63. |
|
|
randNum >>= 6; | randNum >>= 6; |
*salt++ = _SALT_STRING[ randNum & 0x3f ]; | *salt++ = _SALT_STRING[ randNum & 0x3f ]; |
| |
salt[2] = '\0'; |
*salt = '\0'; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |