Showing posts with label Java Code for XML Digital Signature Creation. Show all posts
Showing posts with label Java Code for XML Digital Signature Creation. Show all posts

Saturday, 21 January 2017

Java code for xml digital signature creation and verification

Java code for xml digital signature creation and verification

In Previous post, I discussed about XML digital signature API hope you read from this post .

XML Signature Creation 

Identifying the resources to be signed.
Computing the digest of each resource.
Signing the document.

Click here to download complete java code for xml digital signature creation and verification.

Java Code for XML Digital Signature Creation

Java code for xml digital signature creation

Java code for xml digital signature creation


Creation of JKS File

Go to your JRE bin location  C:\Program Files\Java\jre1.8.0_91\bin and run this command.
keytool -genkeypair -dname "cn=Nitesh Kumar, ou=JavaSoft, o=Sun, c=IN" -alias digitalsignature -keypass digsign -keystore D:\Digital_signature\keystore.jks -storepass storepassword -keysize 2048 -keyalg RSA -sigalg SHA1WithRSA(orSHA256WithRSA)

 Java Code for XML Digital Signature Verification

Java Code for XML Digital Signature Verification