I'm in the middle of converting an application from .NET to Java and need help duplicating the Encryption/Decryption methods from the .NET application into Java.
- Must be done in Java 5
- Anything encrypted using the .NET code will need to be able to be decrypted using the Java code, and vica versa.
- Must result in a simple to use utility class (or classes) with static methods encrypt(...) and decrypt(...)
- You may use "standard" libraries, such as Bouncy Castle, if needed
- You will not have access to the private keys being use in the application.
I have attached the .NET code that needs to be duplicated for review.