View Single Post
  #8  
Old 2nd August 2011, 13:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,624
Thanks: 793
Thanked 4,996 Times in 3,909 Posts
Default

Code example to create a encrypted password:

Code:
$salt="$1$";
$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for ($n=0;$n<8;$n++) {
	$salt.=$base64_alphabet[mt_rand(0,63)];
}
$salt.="$";
$encrypted_password = crypt($unencrypted_password,$salt);
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote