Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleSign File Attachment
require('AltiKare.Signature', function() {
  var signer = new AltiKare.Signature.Cades();
  signer.ensureCertificate(function() {
    signer.sign($Xml.Evaluate('FileHash'), function(cms, certificate) {
      $Xml.SetValue('Signature', signature);
    });  
  });
});

Signing a PDF attachment

Code Block
require('AltiKare.Signature', function() {
    var pdfSigner = new AltiKare.Signature.Pades();
    pdfSigner.sign($Xml.Evaluate('FileId'), function(){
        $Complete();
    }, '', 'SHA256');
});