Search code examples
javascriptnode.jscryptographydigital-signaturepkcs#11

Sign hash using CADES-BES signature using USB token


under the regulation of the e-invoicing in Egypt, the invoices must be electronically signed before submission. I have been trying to follow the steps in there website: here but I dont have much experience in this field and I dont find enough resources in that link to create the e-signature from the usb token on the hashed value.


Solution

  • You may use Signer.Digital Browser Extension provided from Signer.Digital completely free.

    Download and Install complete setup (just 1.65 MB) Signer.Digital Browser Extension host form CNet Download

    Use below Javascript in your html page code to get CAdES-BES Signature as per ITIDA Egypt standards for Egypt eInvoicing:

    SignResult = await SignerDigital.signHashCAdESEg(<hash of your Json or XML>);

    Pass certThumbPrint parameter to above method to select Certificate Silently without opening Certificate Selection dialog.