From: cajus Date: Sun, 15 Jan 2006 10:37:40 +0000 (+0000) Subject: Moved to real md5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d0ecf4985f809447d9564a24c93d2ed5279dfae0;p=gosa.git Moved to real md5 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2479 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_password-methods-md5.inc b/include/class_password-methods-md5.inc index b27103692..37adff938 100644 --- a/include/class_password-methods-md5.inc +++ b/include/class_password-methods-md5.inc @@ -28,7 +28,7 @@ class passwordMethodMd5 extends passwordMethod function is_available() { - if (function_exists('crypt')){ + if (function_exists('md5')){ return(true); }else{ return false; @@ -38,7 +38,7 @@ class passwordMethodMd5 extends passwordMethod function generate_hash($pwd) { - return "{crypt}".crypt($pwd, substr(session_id(),0,2)); + return "{md5}".base64_encode( pack('H*', md5($pwd)))); } }