I've written a php page which allows users to type in a text string and a
key, then choose from a dropdown menu of encryption/decryption cyphers, and
a method (encrypt, decrypt).
The whole thing works, except the mcrypt command doesn't work.
here is my mcrypt command:
if ($method == 0) {
//Encrypt
$output = mcrypt_ecb ($algorithm, $key, $input, MCRYPT_ENCRYPT) ;
} else {
//Decrypt
$output = mcrypt_ecb ($algorithm, $key, $input, MCRYPT_DECRYPT) ;
}
Here's a list of what the variables may be:
$algorithm = MCRYPT_3DES
$key = "plain text"
$input = "more plain text"
if you want, I can upload a .txt containing the whole php file.
Thanks! :)
key, then choose from a dropdown menu of encryption/decryption cyphers, and
a method (encrypt, decrypt).
The whole thing works, except the mcrypt command doesn't work.
here is my mcrypt command:
if ($method == 0) {
//Encrypt
$output = mcrypt_ecb ($algorithm, $key, $input, MCRYPT_ENCRYPT) ;
} else {
//Decrypt
$output = mcrypt_ecb ($algorithm, $key, $input, MCRYPT_DECRYPT) ;
}
Here's a list of what the variables may be:
$algorithm = MCRYPT_3DES
$key = "plain text"
$input = "more plain text"
if you want, I can upload a .txt containing the whole php file.
Thanks! :)
Comment