Convert md5 in base64 in md5 of 32 characters with PHP

1k views Asked by At

I have an example:

Md5 base64: wPE2JkrsTJxF+KbSDApwYQ==
Md5 using md5_file: c0f136264aec4c9c45f8a6d20c0a7061

how convert the firts md5 in the second md5?

1

There are 1 answers

0
grossvogel On BEST ANSWER

base64_decode gets you from base64 back to binary, and then bin2hex converts that to hex:

$var = "wPE2JkrsTJxF+KbSDApwYQ==";
echo bin2hex (base64_decode ($var));
// prints c0f136264aec4c9c45f8a6d20c0a7061