File_Passwd_Authbasic::generatePassword()
Description
Generate a password usable for "AuthBasic" authentication.
The encryption mode can either be FILE_PASSWD_DES, FILE_PASSWD_SHA or FILE_PASSWD_MD5.
Parameter
- string $pass
the plaintext password to encrypt
- string $mode
the encryption mode to use
- string $salt
the salt to use for encryption (usually empty)
Return value
Returns string encrypted password, or PEAR_Error FILE_PASSWD_E_INVALID_ENC_MODE if encryption mode is not supported.
Example
Example 43-1. File_Passwd_Authbasic::generatePassword()
|
