I need to decrypt encrypted POST value strings with the aid of a secret static key.
I have had a look into crypt() (but it’s only one-way) and Mcrypt, GnuPG,… but I’m not happy with them. I think they are to complex for my simple issue. What should I use? I don’t need IV shapes or super safe algorithms. Is there any basic PHP function, that I don’t know yet?
I just need to hide image pathes from users like that:
ImageJPEG(ImageCreateFromJPEG( decode($_REQUEST[‘encryptedImage’],’secret Key’) ));
Update (27/09/17):
Since mcrypt_encrypt is DEPRECATED as of PHP 7.1.0. Ive added a simple encrypt/decrypt using openssl.
Original Answer:
Cant get simpler then this: (PHP < 7.1.0):