Rudiments
|
Static Public Member Functions | |
static char * | encrypt (const char *password, const char *salt) |
static bool | needsMutex () |
static void | setMutex (threadmutex *mtx) |
The crypt class provides a static encryption method that is commonly used for password encryption.
|
static |
Encrypts "password" using the des algorithm and "salt" (which should be a 2 character string from the set [a-zA-Z0-9./].
Returns the encrypted password on success or NULL on failure.
Note that this method allocates a buffer internally and returns it. The calling program must deallocate this buffer.
|
static |
If your system doesn't support crypt_r() then this class needs a mutex to assure thread safety.
This method returns true if this class needs a mutex to operate safely in a threaded environment and false otherwise.
|
static |
Allows you to supply a mutex is the class needs it. If your application is not multithreaded, then there is no need to supply a mutex.