Posted By:
Julien_SIMON
Posted On:
Wednesday, January 9, 2002 12:25 AM
Here's how you can use it :
// Applet constructor
private RandomData random = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
// Applet APDU handling code
private processGetChallenge(APDU apdu) {
short length = apdu.setOutGoing();
random.generateData(apdu.getBuffer(), (short)0, length);
apdu.setOutgoingLength(length);
apdu.sendBytes((short)0, length);
}
That's it !