I haven't work much with php and crypting, thats why I don't know to way how to 3DES-CBC works and what is the vector IV, but I still need to decrypt this file tag_pin_example.enc and make a decrypt generator for files likes that.
Here is my "brilliant" piece of code:
Code: Select all
<?php
//include 'todec.php';
$inputFile = file("c:\\works\\debug\\kryptaus\\stralfors_pin\\tag_pin_example.enc");
$key = "e1206e7240901c1a8111d077877a81ed";
//$size = mcrypt_get_iv_size(MCRYPT_CAST_256, MCRYPT_MODE_CFB); //i was jus trying to set vector IV
//$iv = mcrypt_create_iv($size, 0);
$decryptedData = mcrypt_decrypt(MCRYPT_3DES, $key, $inputFile,MCRYPT_MODE_CBC);
?>
And gives a warning: Attempt to Use an empty IV, which is NOT recommend in c:\pla pla pla..