aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/demo/SignatureVerificationDemo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/demo/SignatureVerificationDemo.java')
-rw-r--r--src/main/java/demo/SignatureVerificationDemo.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/demo/SignatureVerificationDemo.java b/src/main/java/demo/SignatureVerificationDemo.java
index f7b8d53..5e172b4 100644
--- a/src/main/java/demo/SignatureVerificationDemo.java
+++ b/src/main/java/demo/SignatureVerificationDemo.java
@@ -199,16 +199,21 @@ public class SignatureVerificationDemo {
out.println("\n --- XMLDSIG start ---");
out.println(" " + xmlDSigData.getXmlDsig());
out.println(" --- XMLDSIG end ---");
+ // fetch data
+ // either use result.getHashInputData() (provided varp.setReturnHashInputData(...) has been set true
+ // or use
+ byte[] data = result.getSignedData().getAsByteArray();
+ out.println("\n Signed Data: " + data.length + " bytes (" + result.getSignatureType() + ")");
}
// check if there are timestamps
if (result.getTimeStampValue() != null) {
- out.println("\nTimeStamp value available for this signature");
+ out.println("\n TimeStamp value available for this signature");
}
// check if non textual elements have been detected for this signature
if (result.hasNonTextualObjects()) {
- out.println("\nWARNING: " + result.getNonTextualObjects().size() + " non textual object(s) detected for this signature");
+ out.println("\n WARNING: " + result.getNonTextualObjects().size() + " non textual object(s) detected for this signature");
Iterator noit = result.getNonTextualObjects().iterator();
while (noit.hasNext()) {
NonTextObjectInfo info = (NonTextObjectInfo) noit.next();
@@ -217,7 +222,7 @@ public class SignatureVerificationDemo {
out.println();
} else {
- out.println("\nNo non-textual objects detected for this signature.");
+ out.println("\n No non-textual objects detected for this signature.");
}
}
out.flush();