There are many signing plugins for different operating systems and browsers, the APIs of which are somewhat different from one another. In order to make it easier to add signing support to web applications, we recommend using a JavaScript library with a unified API that allows different plugins to be used in a similar way (independently of the operating system and the browser).
hwcrypto.js
- hwcrypto.js JavaScript component is available in the GitHub environment.
- API description with user’s guide. Support is available for both the new (Native Messages API) and the old (NPAPI) signing module.
- The new hwcrypto.js component can be tested on the signing test page.
-
Show Hide PHP sample application for signing on websites uses hwcrypto.js upon choosing the signing module. When using DigiDocService, the sample application includes creating a container, adding and removing data files, signing with ID-card and mobile-ID, removing the signature and verifying signatures.
Additional information: hwcrypto.js https://hwcrypto.github.io/hwcrypto.js/sign.html.