summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-11-27 11:08:07 +0100
committerAndreas Gohr <andi@splitbrain.org>2011-11-27 11:08:07 +0100
commit491a2c68bc685e7e0cd4f9622ef4051e4a580d62 (patch)
tree13faf4b9670e5a0acf85bd48e18aa6b35f33c180 /inc
parent502a92e072be7b42750b4c9032e7269d1fd7c7b4 (diff)
downloadrpg-491a2c68bc685e7e0cd4f9622ef4051e4a580d62.tar.gz
rpg-491a2c68bc685e7e0cd4f9622ef4051e4a580d62.tar.bz2
renamed passhash method smd6 to lsmd5
Diffstat (limited to 'inc')
-rw-r--r--inc/PassHash.class.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index c13cf4a54..8f62425aa 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -51,7 +51,7 @@ class PassHash {
$method = 'ssha';
$salt = substr(base64_decode(substr($hash, 6)),20);
}elseif(substr($hash,0,6) == '{SMD5}'){
- $method = 'smd6';
+ $method = 'lsmd5';
$salt = substr(base64_decode(substr($hash, 6)),16);
}elseif($len == 32){
$method = 'md5';
@@ -135,13 +135,15 @@ class PassHash {
/**
- * Password hashing method 'smd6'
+ * Password hashing method 'lsmd5'
*
- * Uses salted MD5 hashs. Salt is 8 bytes long. Yes, really 8 bytes...
+ * Uses salted MD5 hashs. Salt is 8 bytes long.
+ *
+ * This is the format used by LDAP.
*/
- public function hash_smd6($clear, $salt=null){
- $this->init_salt($salt,8);
- return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt);
+ public function hash_lsmd5($clear, $salt=null){
+ $this->init_salt($salt,8);
+ return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt);
}