md5 and base64 encoding
Posted 09 October 2006 - 11:41 AM
i am using an open source (java) filemanager on one of my websites. user data is stored in an xml-file.
when a visitor uses the filemanager itself to register, the password is first md5 encrypted and after that base64 encoded (according to the developer).
now i want to write my own register-form for this filemanager. so i take the password value, md5() and base64_encode() it, but it gives NOT the saùme result as when the filemanager itself encrypts.
f.i password= 19721972 ==> filemanager result = NREVYMjLF45+vX9VM9KAxg==
but : $password=19721972, md5($password) ==> 35111560c8cb178e7ebd7f5533d280c6
and then base64_encode($password) ==> MzUxMTE1NjBjOGNiMTc4ZTdlYmQ3ZjU1MzNkMjgwYzY=
anyone any idea what may cause this difference? the developer told me he used the Java MessageDigest class
to md5 encrypt.
If you know the answer, please do not get to technical (if possible)
thnx in advance.
Posted 09 October 2006 - 11:47 AM
$password=19721972; md5($password); base64_encode($password); echo $password;
What you want is this
$password = 19721972; $password = md5($password); $password = base64_encode($password); echo $password;
Posted 09 October 2006 - 11:52 AM
<? $str = 19721972; $str = md5($str); $str = base64_encode($str); echo $str; ?>
Posted 09 October 2006 - 11:58 AM
Warning: Wrong parameter count for md5() in ...
Posted 09 October 2006 - 12:11 PM
could this be the cause of raw output failure?
Posted 09 October 2006 - 12:12 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users