I have a bit problem with padding. Everything goes fine when I encrypt the text BUT when I decrypt I see some extra characters. Sometime's one character sometimes more and I dont know how to remove them.
But one question I am really upset with is that why does padding show in my decrypted text BUT now others?
Here's my code (PHP) to generate IV:
if($iv = openssl_random_pseudo_bytes(32)){
$final_iv = substr(base64_encode($iv), 0, 32);
//The IV size should be 32 characters
}
Here's example of the paddings:
E¢9Àšæ—–Í
Qcn«ûØ›§Ñ¼waf—®
º„%¬â;¸*Í”¨Ö