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

Libraries

skgl_flutter