Hello,
I would like to know if there is a difference between signing a
String with RSA and with signing it with MD5withRSA. I am trying to sign a small String "config" with my PKCS12 certificate. I get my keystore with :
KeyStore ks = KeyStore.getInstance("PKCS12", "SunJSSE");
FileInputStream fin = new FileInputStream(new File("itdemo4.pfx"));
ks2.load(fin, "demo4".toCharArray());
after which i get the PrivateKey which i use to initialise the Signature as so :
PrivateSignature privateSignature = Signature.getInstance("MD5withRSA");
privateSignature.initSign(privateKey);
and then sign my String :
privateSignature.update("config".getBytes());
byte[] signedConf = privateSignature.sign();
when i save my result to a file and compare it to the same result a collegue gets using MS and Capicom they are hugely different. For example mine is about 3 lines long and his is about 20. What I would like to know is is there a difference between the RSA that he's using and the RSAwithMD5 that I am that would cause such a huge difference in the results? And would I need to loop through my result converting the individual byte to hex string before i post it to the IIS server?
any help would be greatly appreciated.
Thanks,
Joe