Skip to content

SKGL ported from C#. Generate & validate human readable, 20-character serial keys with up to 8 features embedded.

License

Notifications You must be signed in to change notification settings

chayanforyou/skgl_flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SKGL (flutter)

Pub License

The SKGL library, written in Kotlin, with a shiny new API. Use this to generate & validate human readable, 20-character serial keys with up to 8 features embedded.

Installation

Add skgl_flutter as a dependency in your pubspec.yaml file.

Import SKGL:

import 'package:skgl_flutter/skgl_flutter.dart';

Generate a Key

final key = SerialKey.build('a-secret',
    config: SerialKeyBuildConfig(
      features: {1, 3, 5},
      duration: 30,
      chunk: true,
    ));

print(key.text); // XXXXX-XXXXX-XXXXX-XXXXX

Decode a Key

final key = SerialKey('XXXXX-XXXXX-XXXXX-XXXXX', 'a-secret');

var createdOn = key.createdOn;
var expiresOn = key.expiresOn;
var features = key.features;
var isExpired = key.calculateIsExpired();
var daysLeft = key.calculateDaysLeft();

UI

The flutter-powered example project can be used to generate or validate keys,

About

Generate

Validate

About

SKGL ported from C#. Generate & validate human readable, 20-character serial keys with up to 8 features embedded.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published