Got a decrypt code for an file with an md5 has but can not figure

i found a code on the internet to supposedly decrypt a encrypted characters with a md5 has. i have the key but just can not figure out where to put the encrypted code into the php programming…

can anyone help… will this work? if so where would i copy the encrypted characters?

code below

<?php $key = 'Your Key'; $string = 'My String'; // note the spaces $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($encrypted), MCRYPT_MODE_CBC, md5(md5($key))), "\0"); echo 'Encrypted:' . "\n"; var_dump($encrypted); echo "\n"; echo 'Decrypted:' . "\n"; var_dump($decrypted); // spaces are preserved ?>

Output :

Origional : ‘My String’


string ‘X7zPEx/hl2aMvBrK2+V3XJtqvQssSiYUQWTFyHlbjmQ=’ (length=44)


string ‘My String’ (length=9)

What do you want to do?

Do you want to decrypt a MD5 hash like this: 2198e473ba115644b05de518af4593dc

It is not possible. Hash algoritms are spesifically made so they are not reversible. If you want data you can encrypt and decrypt you need to use a encryption algoritm.

There are other ways to figure out hashes though, but they involve hashing data and comparing with the hashed string. Many sites online have huge databases with encrypted passwords for instance. If it is a dataset / text then you’re probably out of luck.

Sponsor our Newsletter | Privacy Policy | Terms of Service