Node.js
Node.js
Example: Crypt2.GetSignatureSigningTimeStr method
Demonstrates how to call the GetSignatureSigningTimeStr method.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var crypt = new chilkat.Crypt2();
success = crypt.VerifyP7M("qa_data/cades/CAdES-T/Signature-C-T-1.p7m","qa_output/out.dat");
if (success == false) {
console.log(crypt.LastErrorText);
return;
}
var numSigners = crypt.NumSignerCerts;
console.log("Num Signers = " + numSigners);
var i = 0;
while (i < numSigners) {
if (crypt.HasSignatureSigningTime(i) == true) {
console.log((i+1) + ": " + crypt.GetSignatureSigningTimeStr(i));
}
else {
console.log((i+1) + ": has no signing time.");
}
i = i+1;
}
// Sample output:
// Num Signers = 1
// 1: Sun, 03 Dec 2013 06:57:41 GMT
}
chilkatExample();