Re: SSHA Password Encryption

From: Date: Mon, 01 Oct 2012 12:10:22 +0000
Subject: Re: SSHA Password Encryption
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-319308@lists.php.net to get a copy of this message
On Mon, Oct 1, 2012 at 1:01 PM, Coşkun Bağrıaçık <coskun.bagriacik@gmail.com> wrote: > Hi guys, > > I wanna change password into ldap directory, but password's encryption is > SSHA. > How do I encrypt the string to SSHA from php ? http://php.net/manual/en/function.sha1.php look @ user contribuited notes for "SSHA LDAP password generation algorithm for standard PHP > 5.0 " $salt = sha1(rand()); $salt = substr($salt, 0, 4); $hash = base64_encode( sha1($password . $salt, true) . $salt ); return $hash; -- + http://vipertechnology.dyndns.org () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments + http://vipertechnology.dyndns.org/cotnact/

« previous php.general (#319308) next »