On Mon, Oct 1, 2012 at 1:01 PM, Coşkun Bağrıaçık
<coskun.bagria...@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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to