Code

Moved to real md5
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 15 Jan 2006 10:37:40 +0000 (10:37 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 15 Jan 2006 10:37:40 +0000 (10:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2479 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_password-methods-md5.inc

index b27103692f0403b3b53f37a2d5eccb098f9581a5..37adff9386e4af448c6829125ce30cc817c85a7f 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))));
        }
 }