I have tested with PKI applet from github (https://github.com/JavaCardOS/Java-Card-PKI-Applet), I run samcode to get signature, then i convert signcert.der to create signature with java code (data inputs are one)
But i got result different with PKI applet
Here is my code in java code
Code: Select all
Signature sig = Signature.getInstance("Sha1WithRSA");
sig.initSign(myPrivKey);
sig.update(data);
byte [] sign = sig.sign();
System.out.println("Sign Data Done! \n");