Hi!
I know it might seem to be a newbie question, but I would really like to get that. I have my certificate and private key. Now I want to sign some data. First I did that with
Signature s = Signature.getInstance("SHA1withRSA", sunRSA); // SunRSASign as provider
and I got some results. Now I would like to do the same (and get the same results) but doing that in 2 phases (as ideally I would like to create signing server and would like to send only hashes of messages there) and so I did something like:
MessageDigest digest = MessageDigest.getInstance("SHA-1");
and hashed my data and then I played with
c = Cipher.getInstance("RSA/ECB/PKCS1PADDING", sun);
c = Cipher.getInstance("RSA/ECB/NOPADDING", sun);
and some others settings but never get the same result. Could someone explain to me what SHA1withRSA is actually equivalent to?
Hope to get some help from you!
Cheers!