View Single Post
  #8  
Old 2nd August 2011, 13:52
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,770
Thanks: 821
Thanked 5,331 Times in 4,183 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