I am using openssl_encrypt and openssl_decrypt functions to encrypt and decrypt the id passed as querystring. But in some cases the encrypted query string contains '+' character. which causes problem in the openssl_decrypt function and I gets the following warning.
$x = openssl_encrypt ('3', 'AES-256-CBC', $password,0, $iv);
echo openssl_decrypt ($x, 'AES-256-CBC', $password,0, $iv);
Warning: openssl_decrypt(): Failed to base64 decode the input
Please let me know if there is any other method to encrypt data without this '+' characters. Also I want to limit the character length of the encrypted id below 100.