Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Javascript to create a digital signature

Shulou Source: shulou.com Published: 2022-06-01 12:48:08 10月02日 Update

This article introduces the knowledge of "how to use Javascript to create a digital signature". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Sometimes it is necessary for the user to sign the text to prove that he is the one who completed the operation. For example, in e-banking software, users may have to sign a text describing the transaction ("transfer $300 to IBAN xxxxxxxxx") or sign a government e-service request. This can be done through java-applet, but since JRE owners are not in the majority, it is best to use other methods.

Of course, the premise is that the user has a digital signature signed by CA and installs the certificate in the browser according to CA's manual. If these steps are not completed successfully, the following solution will not work.

Also note that this uses PKCS7 (Java developers: use inflatable castles to validate it) instead of the XAdES standard. Internet Explorer supports XAdES, but FireFox does not.

Let's look at a simple HTML page that should sign a given text:

Tags: Numbers digital signatures text users content more electronics knowledge support practicality success learning next people roles premises can pass dilemma castle reality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker vpn MySQL Shulou Tech Info