/ECDSA-WebCryptoAPI-abstraction

This project provides a small abstraction over the original WebCryptoAPI for ECDSA signatures

Primary LanguageTypeScriptMIT LicenseMIT

ECDSA-WebCryptoAPI-abstraction

This project provides a small abstraction over the original WebCryptoAPI for ECDSA signatures.

About

  • This uses the WebCryptoAPI, which is natively available in Node.Js as well as Browsers.

    Note: If you want to use this in browser you can replace crypto.subtle with window.crypto.subtle and it should work the same.

  • The signatures, keys, etc are encoded in base64 so they can be easily used in APIs.

Setup the project

  1. Clone the repo:
git clone https://github.com/codeTIT4N/ECDSA-WebCryptoAPI-abstraction
  1. Install node modules:
npm i
  1. Use the packages provided inside src - Refer to example.ts

Try out an example

npm run example

Few more things

Build the project

npm run build

Run test cases

npm run test