File_Passwd_Smb::generatePassword

File_Passwd_Smb::generatePassword() – Generate password

Synopsis

string File_Passwd_Smb::generatePassword ( string $pass , string $mode = 'nt' )

Description

Generate a "Samba" server style password.

The encryption mode can either be FILE_PASSWD_NT or FILE_PASSWD_LM.

Parameter

string $pass

the plaintext password to encrypt

string $mode

the encryption mode to use

Return value

Returns string encrypted password.

Example

File_Passwd_Smb::generatePassword()

<?php
require_once 'File/Passwd/Smb.php';
$pass File_Passwd_Smb::generatePassword('secret'FILE_PASSWD_LM);
?>

Note

This function should be called statically.

Verify encrypted password (Previous) File_Passwd_Authbasic (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.