Laxidasical Posted February 25, 2010 Share Posted February 25, 2010 I have a script that encrypts data via mcrypt/AES. For some reason I can't seem to store & retrieve that data correctly in MySQL. When I try to retrieve the information and decrypt it I get garbage. I changed my script to base64_encode() the encrypted data, store it in the database, then base64_decode() it before decrypting it, which works great. Everything I've read though says that I should be able to store it in MySQL directly with no problems as long as I'm using a binary datatype (such as BLOB). Any suggestions??? Link to comment https://forums.phpfreaks.com/topic/193398-problem-storingretrieving-aes-encrypted-data-in-mysql/ Share on other sites More sharing options...
fenway Posted February 25, 2010 Share Posted February 25, 2010 How about a simple encrypt/decrypt of a test string/ Link to comment https://forums.phpfreaks.com/topic/193398-problem-storingretrieving-aes-encrypted-data-in-mysql/#findComment-1018265 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.