Dear Friends,
   
                    openssl command
 
                    openssl>dgst -sign ycs.pem -hex -md5 -out out.txt in.txt
 
                    java code
 
                    Signature dsa = Signature.getInstance("MD5withRSA");
                    dsa.initSign(privateKey);
                    dsa.update(toBeSigned.getBytes());
                    byte[] signature = dsa.sign();
                    String digest=byteArrayToHexString(signature);
 
                    Is both java and openssl give same result? Anybody has experience in it. Appreciate your help.

With Regards
Nelby

Reply via email to