Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.35 KB

File metadata and controls

44 lines (30 loc) · 1.35 KB

Example JS Cryptographic License Files

This is an example of how to verify and decrypt cryptographic license files in a browser environment, using Ed25519 verification and AES-256-GCM encryption.

Warning

This example utilizes Web Crypto. You may need to enable certain flags in your browser if support has not landed yet, e.g. for Ed25519. For the best experience, use Firefox.

This example verifies the aes-256-gcm+ed25519 algorithm.

Running the example

First up, install dependencies with yarn:

yarn

Then run the server:

yarn start

You can either manually input or upload the example license file, or input your own values.

The following will happen:

  1. The license file's authenticity will be verified using Ed25519, by verifying its signature using the provided public key.
  2. The license file will be decrypted using the license key as the decryption key.

If everything checks out, the page will display the decrypted contents of the license file — the license object, with any included data. If it fails, review the error and check your inputs.

Questions?

Reach out at [email protected] if you have any questions or concerns!