We are using Mcrypt to encrypt our credit card numbers first to binary and then to hex. The hex numbers are stored in a mySQL database. This is fairly new and all has gone well except for one credit card number that would not decrypt. The first eight numbers decrypted fine but the last eight look like jibberish. Why would this not work on all numbers? I did change the keycode and then it worked fine but the old key code worked on the rest of the numbers so I am not sure how this works. I have attached my code. This is done in Filemaker using a php plugin so some of the code references are for Filemaker. Suggestions?