Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chayanforyou/skgl_flutter
SKGL ported from C#. Generate & validate human readable, 20-character serial keys with up to 8 features embedded.
https://github.com/chayanforyou/skgl_flutter
generator key license serial serial-generator skgl
Last synced: about 15 hours ago
JSON representation
SKGL ported from C#. Generate & validate human readable, 20-character serial keys with up to 8 features embedded.
- Host: GitHub
- URL: https://github.com/chayanforyou/skgl_flutter
- Owner: chayanforyou
- License: bsd-3-clause
- Created: 2024-05-19T11:08:22.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-05-22T10:01:35.000Z (6 months ago)
- Last Synced: 2024-06-06T15:28:44.311Z (5 months ago)
- Topics: generator, key, license, serial, serial-generator, skgl
- Language: Dart
- Homepage: https://pub.dev/packages/skgl_flutter
- Size: 405 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# SKGL (flutter)
[![Pub](https://img.shields.io/pub/v/skgl_flutter.svg?style=popout)](https://pub.dartlang.org/packages/skgl_flutter) [![License](https://img.shields.io/github/license/chayanforyou/skgl_flutter)](https://opensource.org/license/bsd-3-clause)
The [SKGL](https://github.com/Cryptolens/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:
```dart
import 'package:skgl_flutter/skgl_flutter.dart';
```### Generate a Key
```dart
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
```dart
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](https://flutter.dev/)-powered [example](example) project can be used to generate or validate keys,
![About](images/ui-about.png)
![Generate](images/ui-generate.png)
![Validate](images/ui-validate.png)