I'm looking for a simple Java encryption solution that will allow me to specify the encoding such that the encrypted data can be embedded in a JSON document.
Why? My web service returns a descriptive JSON message when errors occur. In the event of an internal server error, I'd like to include a field that contains diagnostic information, however I want to encrypt this data to avoid potential security issues.
I'm going for something similar to YouTube's Internal Server Error, plus JSON and minus monkeys.: