I have this situation:
When I encrypt a string with OpenSSL and store the encrypted string base64_encoded in my MySQL DB, I can decrypt the string back to original with a select and openssl_decrypt.
However, when I save the encrypted string without base64_encoding it to MySQL (in Order to save storage... base64 is killing...) I can't decrypt it to the original string...
How is this possible on a theoretical basis? It returns me the errors of wrong final block length
P.S. I save the base64_encoded and not base64_encoded string both in a LONGBLOB MySQL column. (Inserting with prepared statements and real_escape_string function of MySQL).