Example of verifying cryptographically signed and encrypted license files using Dart, Ed25519 and AES-256-GCM

Overview

Example Dart Cryptographic License Files

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

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

Running the example

Install dependencies with dart pub:

dart pub get

Then run the example program, where -f is the path to a license file, -p is your Ed25519 public key, and -k is a license key. Feel free to use these example values:

dart run main.dart --license-file examples/license.lic \
  --license-key "9FB017-8E74A0-AC60C5-2C8BF6-2D2B90-V3" \
  --public-key "e8601e48b69383ba520245fd07971e983d06d22c4257cfd82304601479cee788"

You should see output indicating that the license file is valid, with its decrypted dataset:

license file was successfully verified!
  > {
      enc: F7g/36/UVMXnPCO7YGA6LaInutjxF06sU...fJCfqFqd5FiLYF33bR1qnYd2M9dfzM+XQ==.Jsw6jutQje0ZWmTn.n++MX8kfMTsqTZQjb2EFVg==,
      sig: VIOP81jRI4EHR7SY69k1O9AV79DNdYgU6uuiY6pR5o9z9Kgh6xli2eHYLVJCprhj2DIPnORD1xxsG22TqeXFDQ==,
      alg: aes-256-gcm+ed25519
    }
license file was successfully decrypted!
  > {
      data: {
        id: e2da9594-218f-41b6-a4d8-43c92b71a6c4,
        type: licenses,
        attributes: {name: Dart Example, ...},
        relationships: {...},
        links: {...}
      }
      included: [
        {id: a963360d-fafb-406a-bfe6-950bafc8bc00, type: products, ...},
        {id: f28621f6-34ec-42e7-84b5-2c659870399b, type: policies, ...},
        {id: 893201f7-e0f8-4a5a-99b5-c567e73f1366, type: users, ...},
        {id: c9e7a95c-e2ac-4580-b3d0-954b48b5c984, type: entitlements, ...},
        {id: dfb1cfce-8614-4ac7-82c4-f5eaa334ba96, type: entitlements, ...},
        {id: ecc6211a-f806-442f-b08a-aa2432d5837a, type: entitlements, ...}
      ],
      meta: {
        issued: 2022-10-04T21:34:54.589Z,
        expiry: 2023-10-04T21:34:54.589Z,
        ttl: 31556952
      }
    }

If the verification fails, check your public key.

If the decryption fails, check your license key.

Questions?

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

You might also like...

Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Flutter Tutorial - Download Files From Firebase Storage Download files from Firebase Storage with Flutter. List all images, videos, or other files fro

Dec 4, 2022

Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Flutter Tutorial - Upload Files To Firebase Storage Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your devic

Dec 28, 2022

Lottie-package-example-Flutter - A simple example about lottie package in Flutter

Lottie-package-example-Flutter - A simple example about lottie package in Flutter

Lottie Package example - Flutter ScreenShot ⚠️ Essential Packages lottie: ^1.2.1

Dec 7, 2022

Smooth-Page-Indicator-Example-Flutter - A simple example about smooth page indicator in Flutter

Smooth-Page-Indicator-Example-Flutter - A simple example about smooth page indicator in Flutter

Smooth Page Indicator Example - Flutter Screenshots ⚠️ Essential Packages smooth

Dec 7, 2022

Tool made in Dart that allows you to dynamically generate JSON files from data models written in Dart.

Dart JSON Generator Versión v1.1.1 Dart JSON Generator es una herramienta que permite generar archivos JSON a partir de mapas como modelos de datos en

Nov 23, 2022

A simple and robust dart FTP Client Library to interact with FTP Servers with possibility of zip and unzip files.

Flutter FTP Connect Flutter simple and robust dart FTP Connect Library to interact with FTP Servers with possibility of zip and unzip files. Key Featu

Dec 13, 2022

Flutter package for displaying and animating Scalable Vector Graphics 1.1 files. The package has been written solely in Dart Language.

Flutter package for displaying and animating Scalable Vector   Graphics 1.1 files. The package has been written solely in Dart Language.

Animated SVG | Flutter Package Flutter package for displaying and animating Scalable Vector Graphics 1.1 files. The package has been written solely in

Jul 19, 2022

Scaff is a simple command-line utility for generating Dart and Flutter components from template files.

Introduction Scaffold Generator for Dart and Flutter. scaff is a simple command-line utility for generating Dart and Flutter components from template

Jul 17, 2022

Dart programming learning Files

dart_programming A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Nov 23, 2021
Owner
Keygen
A dead-simple software licensing and distribution API built for developers
Keygen
Open-source, cross-platform, hassle-free file sharing with AES-256 encryption made with Flutter & Dart.

Odin ⚡ Open source easy file sharing for everyone. ⚡ Cross-platform hassle-free file sharing with AES-256 encryption made with Flutter & Dart. Getting

Odin 111 Dec 22, 2022
Intel Corporation 238 Dec 24, 2022
Nepal Driving License Preparation Flutter (Android)

Nepal Driving License Preparation Download Playstore » Table of Contents Nepal Driving License Preparation Built With Screen Shots Getting Started Pre

Rabin Phaiju 1 Jan 8, 2022
User auth form - Signup and signin user auth form with ability to stay signed in and have an option to signout.

user_auth_form SIgnup and signin user authentification form Getting Started This project is a starting point for a Flutter application. A few resource

null 0 Jan 6, 2022
Flutter package for sending and verifying SMS/OTP

Flutter Termii A Flutter plugin that helps developers use messaging channels to verify and authenticate customer transactions Android iOS Linux macOS

Abdulazeez Oshinowo 5 May 26, 2022
The mobile app to verify digitally signed invoices.

Invoice Verif The mobile application for verifying invoices generated by the signed-invoice tool. All verification steps are performed on your termina

Maël Gangloff 3 Oct 18, 2022
Mildly encrypted package - An encryption client & server for Dart Native + mobile platforms.

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Andrew Stein 0 Jan 9, 2022
Bhargav Reddy 10 Nov 12, 2022
A package for encrypted shared preferences

Prefs Guard Prefs Guard is a data protection wrapper for local storage (Shared Prefs). supporting both IOS & Android. - Notice :- Use Same GuardType t

null 26 Jun 7, 2022
PrivateFit is an E2E encrypted fitness application built on the atPlatform.

Private Fit Now for a little internet optimism Generated by the at_app CLI and Very Good CLI ?? A secure fitness app. Getting Started ?? This project

The Atsign Foundation 6 Oct 31, 2022