gyrus Posted June 25, 2009 Share Posted June 25, 2009 Not sure how to title this since it's a bit bizarre.. I have a script that encrypts a string using mcrypt, stores the encrypted data into a mysql database as a BLOB, then pulls, and decrypts the data. Everything works fine but I'm getting this character � as a filler if the string isn't 16 characters. This is only showing up in Firefox, not Safari or IE. Just wondering if this is a issue I should be concerned about. Thanks for any help! Link to comment https://forums.phpfreaks.com/topic/163696-solved-mcrypt-excess-characters/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 25, 2009 Share Posted June 25, 2009 The data that will be encrypted with the given cipher and mode. If the size of the data is not n * blocksize, the data will be padded with '\0'. They are NULL (0) characters. You should use a function like trim() or rtrim() to remove them. Link to comment https://forums.phpfreaks.com/topic/163696-solved-mcrypt-excess-characters/#findComment-863768 Share on other sites More sharing options...
gyrus Posted June 25, 2009 Author Share Posted June 25, 2009 Worked like a charm Thanks! Link to comment https://forums.phpfreaks.com/topic/163696-solved-mcrypt-excess-characters/#findComment-863781 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.