From d0ecf4985f809447d9564a24c93d2ed5279dfae0 Mon Sep 17 00:00:00 2001 From: cajus Date: Sun, 15 Jan 2006 10:37:40 +0000 Subject: [PATCH] Moved to real md5 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2479 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_password-methods-md5.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)))); } } -- 2.30.2