J A V A S C R I P T     I N T E G R A T I O N     S A M P L E     FOR BROWSER PLUGIN REPLACEMENT

XMLDsig Detached Signature in Source XML - signing by Id

Input is an XML string and the resulting signature is integrated into the input string as the last child of the root. The elements to be signed are defined by setting respective Id values that already exist in the input XML. The option XSIGN_OPTION_SIGN_BY_ID has to be set. Review the page source code for integration sample.

Click the Sign button.

Click the Verify button.

Prerequisites:

  • proXSign browser plugin replacement installed and running
  • provide valid XML input and list of existing Ids to be signed
  • note, that Id attribute has to start with capital I and small d letter (Id) or has to have both small letters (id)

Sample xml text (node with Id="test1", Id="test2" and Id="test3" will be signed):

XML nodes to be signed*:

* Comment: XMLDsig Reference Type may be set by passing ##type_value; after respective id.

XMLDsig signature: