'how to add digital signature to hash data in node js use .cer file?

I'm new to digital signatures and how to use them, so I can't complete my task.

  • Sign the hash with the CADES-BES signature.

  • Insert a new element with a Base64 encoded CADES-BES signature into the original document XML or JSON.

I want to add a signature to hash data using a CADES-BES signature and I have a public key.

Please, any help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source