short Le = apdu.setOutgoing();  if (Le < BUFFER_LENGTH) ISOException.throwIt(ISO7816.SW_WRONG_LENGTH); apdu.setOutgoingLength(BUFFER_LENGTH); apdu.sendBytesLong(code, (short) 0, BUFFER_LENGTH);
crypt(inBuffer, (short)ISO7816.OFFSET_CDATA, byteRead, code, (short)0, serverKey);  apdu.setOutgoingLength((short)code.length); apdu.sendBytesLong(code, (short)0, (short)code.length);
    private void encode(APDU apdu)    {        short messLength = apdu.setIncomingAndReceive();        randomer.generateData(code, (short) 0, BUFFER_LENGTH);        for (short i = 0; i < messLength; i++) {            code[(short)(i + key)] = buffer[(short)(i + ISO7816.OFFSET_CDATA)];        }                short Le = apdu.setOutgoing();        // Verification que Le >= Lc (taille des donnes envoyes)        if (Le < BUFFER_LENGTH)            ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);        apdu.setOutgoingLength(BUFFER_LENGTH);        apdu.sendBytesLong(code, (short) 0, BUFFER_LENGTH);    }