Code

Added DNS and DHCP enable disable options into setup step 2
[gosa.git] / include / class_password-methods-md5.inc
index b27103692f0403b3b53f37a2d5eccb098f9581a5..43b3ec74c5b9811b6ddfe8163ff70ee53268401e 100644 (file)
@@ -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)));
        }
 }