tags:

views:

74

answers:

1

Can anybody tell me how to generate signature for "RSASSA-PKCS1-v1.5" in Java?

I, actually, want to know how do I with java.security.Signature class.

Do I have to use any 3rd party libraries?

+1  A: 

Sun JCE supports PKCS#1 signature. This is all you have to do,

Signature signer = Signature.getInstance("SHA1withRSA");
signer.initSign(privateKey);
signer.update(message);
byte[] signature = signer.sign();
ZZ Coder
Thank you for the answer.
Jin Kwon