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’
Encrypted:
string ‘X7zPEx/hl2aMvBrK2+V3XJtqvQssSiYUQWTFyHlbjmQ=’ (length=44)
Decrypted:
string ‘My String’ (length=9)