This program was created for a license key generation and validation.
There is 2 variants: right from the code or generate a jar and use it
- Run right from the code (all scripts lie in a root folder to have an access to build.sbt)
- To generate a key run
./generateKey.sh <domain> <date>. Date must have the following format dd-mm-yyyy - To validate a key run
./validateKey.sh <key>. After it you will see a corresponding result as a message - To test a program - run
sbt test
- To generate a key run
- Through a jar file
- Run
sbt proguardin a root folder. It will generate 2 jar files - licence-key-encoded.jar and licence-key.jar in a ./jar folder.. The first one is encoded by progurard so you should use it. It will run tests too. - Open a terminal in a ./jar folder.
- Use the same scripts as in the previous variant. Everything is the same.
- To test a program - run
sbt test
- Run
- Util - consists of constants and common methods
- App - an entrypoint
- Decoder - an object that consists of methods used for decoding and validation of a key.
- Encoder - an object that consists of methods used for key generation.
- Messages - an object that contains different useful messages and strings
Read a specification in a KeySpecification.docx