Here is the code that i have
Code: Select all
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = "somekey";
$text = "Hello there";
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_CBC, $iv);
echo $crypttext;
Here is the problem. I believe this is the AES algorithm. i got one more solution in C# which does the same AES encoding but the values are differing from each other. My encrypted text when echoed gives out special characters, the C# gives hex characters i suppose. Can any one give me a solution for the same.
Thanks in advance.