Weird string problem

I have an encrypted string in the DB that is passed to my crypto lib which is just a wrapper of decypt/encrypt AES. I was getting an error on decrypt() of a new record. I had just copy/pasted from a writedump() to the DB of the encrypted string. I could encrypt and then decrypt a straight code example of the same data fine. The writedump() of the DB value and the code example encrypt were the same but compare() gave a difference. len() returned the same and a binaryencode() to HEX reported the same. I solved by writing a query update to the DB with the encrypted text and then it worked fine. I don’t know if the copy/paste from the writedump() was injecting something strange. Why did the binarydecode() and len() report the same.

Lucee 6.2.1.122

Perhaps the presence somewhere of an invisible character such as a byte order mark? To verify, seach the string for chr(65279).

1 Like