PHP - Generate SSHA (sha1) Password For LDAP User07 Jan 2013 $info['userpassword'][0] = "{SHA}" . base64_encode(sha1("pass", TRUE));