EPIC QR Code Decoder
Go to file
Nemo deb0cdfa3d push browser build 2024-01-09 20:10:41 +05:30
_scripts move target hxmls away from root 2024-01-08 10:53:49 +05:30
_targets move target hxmls away from root 2024-01-08 10:53:49 +05:30
src push browser build 2024-01-09 20:10:41 +05:30
test Update docs for Java 2024-01-06 13:23:10 +05:30
.gitignore Adds PHP code, autogenerated from Haxe (somewhat) 2024-01-08 10:44:39 +05:30
HACKING.md Adds HACKING.md 2024-01-06 13:24:27 +05:30
LICENSE initial commit 2024-01-05 21:52:42 +05:30
README.md add partial doc for nodejs 2024-01-07 23:09:13 +05:30
SPEC.md Adds Java code 2024-01-06 13:16:34 +05:30
extraParams.hxml initial commit 2024-01-05 21:52:42 +05:30
haxelib.json version: 0.9.2 2024-01-06 09:35:57 +05:30

README.md

EPIC QR Decoder

Haxe library to decode a QR code on a modern EPIC Card. This is a polyglot repo, containing source code for multiple languages:

  • Haxe
  • Java

The Haxe code can be cross-compiled to several targets including PHP/Python/Flash/JVM/JS etc.

TODO

  • Tests for Haxe.
  • Tests for Haxe with specific targets
  • Publish 1.0.
  • Publish releases for Swift.
  • Publish releases for JS.
  • Publish releases for Nodejs.
  • Create maven release on GitHub Packages.
  • Create Demo website.

Usage

Haxe

import eci.EpicQR;

class Main{
	static function Main(){
		// This is the result of scanning the QR code as text.
		var result = decrypt("dbhvecY6Roa4NF3gAzEbkTibZZzXAEYpMg8197BQWMS2+ID24FGDKWB5IEcuxjsA81ChprhSO3EsjKMRDbBWLg==");
		trace(result.epic); // "ABC1234566"
		trace(result.id); // 1234
	}
}

Java

import eci.EpicQR;
// This is the result of scanning the QR code as text.
String e1 = "dbhvecY6Roa4NF3gAzEbkTibZZzXAEYpMg8197BQWMS2+ID24FGDKWB5IEcuxjsA81ChprhSO3EsjKMRDbBWLg==";
Result r1 = EpicQR.decode(e1);
assert r1.epic.equals("ABC1234566") : "Invalid EPIC";
assert r1.id == 1234 :  "Invalid Unique ID";

Nodejs

// TODO Import
const E = require('eci').EpicQR;
var r = E.decode("dbhvecY6Roa4NF3gAzEbkTibZZzXAEYpMg8197BQWMS2+ID24FGDKWB5IEcuxjsA81ChprhSO3EsjKMRDbBWLg==")
console.log(r.epic) // "ABC1234566"

Specification

See SPEC.md.

LICENSE

Licensed under MIT. See LICENCE file for more details.