diff -urN change_ldappass.1.6/options.php change_ldappass.1.7/options.php
--- change_ldappass.1.6/options.php	2003-07-26 23:15:23.000000000 +0200
+++ change_ldappass.1.7/options.php	2004-03-05 14:29:13.000000000 +0100
@@ -237,6 +237,15 @@
 				$salt = substr($hash, 16);
 				$cpass = base64_encode(pack("H*", md5($cp_oldpass . $salt)).$salt);
 				break;
+			case "{ssha":
+				if ($debug) array_push($Messages, _("Password type is {SSHA}"));
+				// thanks go to brian_bisaillon at rogers dot com (see http://php3.de/md5):
+				$hash = base64_decode($lpass) ;
+				$salt = substr($hash, 20);
+				$original_hash = substr($hash, 0, 20);
+				$new_hash = mhash(MHASH_SHA1, $cp_oldpass. $salt);
+				$cpass = base64_encode($new_hash . $salt);
+				break;
       default:                        // Use plain text password
         $cpass=$cp_oldpass;
         $lpass=$storedpass;     // Override $lpass as it is truncated from the original
@@ -262,6 +271,9 @@
 			case "{smd5":
 				$newpass="{SMD5}".ldap_smd5_passwd($cp_newpass);
 				break;
+			case "{ssha":
+				$newpass="{SSHA}".ldap_ssha_passwd($cp_newpass);
+				break;			
 				
 			// more password types should go here ;-) and the functions to drive them below.
 	    default:                        // Use plain text password
@@ -326,6 +338,13 @@
 	 return $new_password ;
 }
 
+// thanks go to brian_bisaillon at rogers dot com (see http://php3.de/md5):
+function ldap_ssha_passwd($clear_pw) {
+	 $salt = myhash_keyge_s2k($clear_pw, 4);
+	 $new_password = base64_encode(mhash(MHASH_SHA1, $clear_pw . $salt) . $salt);
+	 return $new_password ;
+}
+
 // Generate salted crypt passwords
 function ldap_crypt_passwd($password,$salt,$stype) {
 	if ($stype=="MD5") 	return crypt($password,substr($salt,0,12)); 						//MD5 uses 12 chr salt
