version 1.8.6.1, 2003/07/29 15:08:30
|
version 1.12, 2003/10/22 14:26:13
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2003//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
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(); |
} | } |