Skip to content
This repository has been archived by the owner on Dec 27, 2017. It is now read-only.
/ counter-applet Public archive

A Java Card applet implementing a very simple counter

Notifications You must be signed in to change notification settings

fidesmo/counter-applet

Repository files navigation

Counter Applet

This is a very simple Java Card applet implementing a secure counter. It is based on the Fidesmo gradle plugin example. You can read all about it in this tutorial.

Functionality

  • When installed, the applet will receive the initial counter value as an install parameter. The initial counter value is limited to 1 byte: otherwise installation will fail with error code 6985, "conditions of use not satisfied"
  • Command SELECT (A4) will return the current value of the counter
  • Command DECREMENT (00):
    • If counter > 0, it will decrease its value and return the new value of the counter
    • If counter = 0, it will return an error code 6985

Building instructions

To build this project, use gradle:

./gradlew build - Build the application and create the CAP-file.

Then you can upload the CAP-file to your account at Fidesmo Developers Portal using the /executableLoadFiles POST operation, and use the Fidesmo Android app to install it on any Fidesmo-enabled device.

Releases

The code in this repository is not written to be released, only as an example to be shared with a customer.

About

A Java Card applet implementing a very simple counter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages