SampleBioServerpublic class SampleBioServer extends Applet implements SharedBioTemplatepackage AID: A0:00:00:00:62:03:01:0C:0f:01
applet AID: A0:00:00:00:62:03:01:0C:0f:01:01 |
Fields Summary |
---|
public static final byte | CLA | public static final byte | INS_ENROLL | public static final byte | MATCH_TRY_LIMIT | private OwnerBioTemplate | impl |
Constructors Summary |
---|
protected SampleBioServer(byte[] bArray, short bOffset, byte bLength)Only this class's install method should create the applet object.
byte aidLen = bArray[bOffset];
if (aidLen== (byte)0){
register();
} else {
register(bArray, (short)(bOffset+1), aidLen);
}
impl = BioBuilder.buildBioTemplate(BioBuilder.PASSWORD,MATCH_TRY_LIMIT);
|
Methods Summary |
---|
public void | enrollData(APDU apdu)method takes in the data
This implementation assumes that all the password data is given in the
enroll method.
byte []buffer = apdu.getBuffer();
short bytesRead = apdu.setIncomingAndReceive();
impl.init(buffer, ISO7816.OFFSET_CDATA, bytesRead);
impl.doFinal();
//enrollment complete
| public byte | getBioType()
return impl.getBioType();
| public short | getPublicTemplateData(short publicOffset, byte[] dest, short destOffset, short length)
return impl.getPublicTemplateData(publicOffset,dest,destOffset,length);
| public Shareable | getShareableInterfaceObject(AID clientAID, byte parameter)
return this;
| public byte | getTriesRemaining()
return impl.getTriesRemaining();
| public short | getVersion(byte[] dest, short offset)
return impl.getVersion(dest,offset);
| public short | initMatch(byte[] candidate, short offset, short length)
return impl.initMatch(candidate,offset,length);
| public static void | install(byte[] bArray, short bOffset, byte bLength)Installs this applet.
new SampleBioServer(bArray,bOffset,bLength);
| public boolean | isInitialized()
return impl.isInitialized();
| public boolean | isValidated()
return impl.isValidated();
| public short | match(byte[] candidate, short offset, short length)
return impl.match(candidate,offset,length);
| public void | process(APDU apdu)Processes an incoming APDU.
byte buffer[] = apdu.getBuffer();
// check SELECT APDU command
if(selectingApplet())
return;
switch (buffer[ISO7816.OFFSET_INS]){
case INS_ENROLL:
enrollData(apdu);
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
| public void | reset()
impl.reset();
|
|