Sample Java class to decrypt AES128 encryption
I downvoted it with the comment
This is a Java question, not a Salesforce question. Stackoverflow would be a more appropriate place; also Google renders dozens of results.
But @superfell weighed in with
given that the string was encrypted by apex code, i think its reasonable to ask here.
What do other people think? I'm frankly surprised that superfell would defend the question, but I respect him a lot so I can't just dismiss his feedback.
To me, the question wasn't appropriate because:
- it's asking for a Java code sample
- AES is a generic standard, so the fact that this guy wants to decrypt in Java something that was encrypted in Apex make it no more Apex-related than, say, posting the same question to a Ruby discussion board because the string was encrypted in Ruby.
- on the off chance that the OP thinks there is something specific to Apex that would make this a non-generic AES decryption question (perhaps Apex does managed IV's in an idiosyncratic way?), he/she failed to mention that.
- even if the subject matter is relevant, the first several hits on Google for "aes decrypt java" return working code samples. I generally downvote questions that can be fully answered by the first hit of a simple Google search. (Anyone dislike that practice?)
Thoughts?