I am using XXTEA in javascript and all is working, but I want to be able to have an error check for the password - so I need to determine if the decryption of arbitrary text was successful or not.
Currently, the only solution I can think of, which is not ideal, is to start the text with a token during encryption, and check if it is there after decryption - but this is not ideal. Is there another way?