How to decryption with MCRYPT_ARCFOUR?

219 views Asked by At

I am trying to decrypt a text which is encrypted with ARCFOUR cipher. But it is not giving me the desire output.

My code:

<?php

$key = "25f9e794323b453885f5181f1b624d0b";
$data = "B9D6B23709029B47043904AC5F";
$iv = "";
$output = mcrypt_decrypt(MCRYPT_ARCFOUR, $key, $data, MCRYPT_MODE_STREAM,$iv);

echo $output;
?>

It is giving me bellow output:

`vþ°_¡!YH´@ÃV6P9;EfA

But actual output is :

9779802100083

I don't know what I am missing.I am using PHP Version 5.5.32 and mcrypt version 2.5.8. Do they support "MCRYPT_ARCFOUR" ? I did some research and found that only mcrypt-2.4.x support "MCRYPT_ARCFOUR". Is there any way to solve this issue without changing mcrypt-version?

0

There are 0 answers