package org.cryptonit;

import javacard.framework.APDU;
import javacard.framework.Applet;
import javacard.framework.ISO7816;
import javacard.framework.ISOException;

public class CryptonitApplet extends Applet {
    protected CryptonitApplet(byte[] bArray, short bOffset, byte bLength) {
        register();
    }

    public static void install(byte[] bArray, short bOffset, byte bLength) {
        new CryptonitApplet(bArray, bOffset, bLength);
    }

    @Override
    public void process(APDU apdu) {
        byte buffer[] = apdu.getBuffer();
		if (apdu.isISOInterindustryCLA()) {
            if (buffer[ISO7816.OFFSET_INS] == (byte) (0xA4)) {
                return;
            }
            ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
        }
        ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }
}

@@ -157,16 +157,52 @@
 ception;
+%0Aimport javacard.framework.OwnerPIN;
 %0A%0Apublic
@@ -241,16 +241,144 @@
 pplet %7B%0A
+    private OwnerPIN pin;%0A%0A    private final static byte PIN_MAX_LENGTH = 8;%0A    private final static byte PIN_MAX_TRIES  = 5;%0A%0A
     prot

Add PIN variables and constants