Last active
October 6, 2020 09:47
-
-
Save GroupDocsGists/860444814f9530f71f311781b9f5e606 to your computer and use it in GitHub Desktop.
Verify Digital Signatures in Documents using Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Verifying Digital Signatures in a PDF document using Signature API for Java by GroupDocs | |
Signature signature = new Signature("sample_signed.pdf"); | |
DigitalVerifyOptions options = new DigitalVerifyOptions("certificate.pfx"); | |
options.setComments("Test comment"); | |
options.setPassword("1234567890"); | |
// Verify Document Signatures | |
VerificationResult result = signature.verify(options); | |
if (result.isValid()) { | |
System.out.println("Document Verified Successfully !"); | |
} | |
else { | |
System.out.println("Document Verification Failed."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment