string File_Passwd_Smb::generatePassword (string $pass [, string $mode = 'nt'])
string File_Passwd_Smb::generatePassword
Generate a "Samba" server style password.
The encryption mode can either be FILE_PASSWD_NT or FILE_PASSWD_LM.
the plaintext password to encrypt
the encryption mode to use
Returns string encrypted password.
Example 37-1. File_Passwd_Smb::generatePassword()
require_once 'File/Passwd/Smb.php'; $pass = File_Passwd_Smb::generatePassword('secret', FILE_PASSWD_LM);
This function should be called statically.
See also Crypt_CHAP_MSv1::ntPasswordHash() , Crypt_CHAP_MSv1::lmPasswordHash() .