This content has been marked as final. Show 1 reply
986147 wrote:I would doubt very much if you would find a converter that would handle all those C# crypto libraries.
Are there any converters available that converts C# code to Java?
Manually converting that C# code to Java would not take long; probably much less time than trying to find a converter to do the job. The JCE has all the functionality except for the Base64 encoding which can be performed using the 'apache commons codec' library. MACTripleDES is just a CBC-MAC (using zeros pading) which is easy to implement using the JCE. You will have to do some trivial byte manipulation to convert the 16 bytes of the MD5 hash to the 24 byte key needed by 3DES in the JCE.
P.S. You do realise that the data is not actually encrypted. It is just Base64 encoded and a MAC appended. An encoded value with MAC cannot be forged without having the key but it can easily be decoded.
Edited by: sabre150 on Feb 5, 2013 3:28 PM