🏡 index : github.com/captn3m0/epicqr.git

author Nemo <me@captnemo.in> 2024-01-06 13:23:10.0 +05:30:00
committer Nemo <me@captnemo.in> 2024-01-06 13:23:10.0 +05:30:00
commit
542936eee41add21f65bfff42ed2d1d24e9438e3 [patch]
tree
6f81974973a5467dc8aa8f086ca62da96a1a63c1
parent
87ffbdf555f63bf77ec037f296081cba39b0c2aa
download
542936eee41add21f65bfff42ed2d1d24e9438e3.tar.gz

Update docs for Java



Diff

 .gitignore      |  3 ++-
 README.md       | 40 +++++++++++++++++++++++++++++++++-------
 test/Test.class |  0 
 3 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9e56135..25a4539 100644
--- a/.gitignore
+++ a/.gitignore
@@ -1,4 +1,5 @@
haxe-build.zip
build/

*.jar
*.jar
*.class
diff --git a/README.md b/README.md
index 117432f..a3f9d70 100644
--- a/README.md
+++ a/README.md
@@ -1,31 +1,55 @@
# EPIC QR Decoder

Haxe library to decode a QR code on a modern EPIC Card.
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](https://haxe.org/documentation/introduction/compiler-targets.html)
including PHP/Python/Flash/JVM/JS etc.

## TODO

- [ ] Tests.
- [ ] Tests for Haxe.
- [ ] Publish 1.0.
- [ ] Publish releases in other languages.
- [ ] Publish releases in Swift.
- [ ] Publish releases in JS.
- [ ] Create maven release on GitHub Packages.
- [ ] Create Demo website.

## Usage

### Haxe

```haxe

import eci.EpicQR;

class Main{
	static function Main(){

		var result = decrypt("Kk0pDEzxYcusltFhJmqL/LLzJtXYHH/a1rJfkK2GjzA1x5jrzaeT1ULEF38L7/lIQ8w3c+H4ePeuVs2HuMYDUg==");

		trace(result.epic);

		trace(result.id);

		// 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

```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";
```


## Specification

See <SPEC.md>.
See [`SPEC.md`](SPEC.md).

## LICENSE

Licensed under MIT. See `LICENCE` file for more details.
Licensed under MIT. See [`LICENCE`](LICENSE) file for more details.
diff --git a/test/Test.class b/test/Test.class
deleted file mode 100644
index 3d76060b4113c150199f687dbeb854a5757f57f8..0000000000000000000000000000000000000000 100644
Binary files a/test/Test.class and /dev/null differ