Code: Select all
    private void sendChallenge(APDU apdu){
    byte[] apduBuffer = apdu.getBuffer();
    apdu.setOutgoing();
    try {
     
      SecureRandom prng = SecureRandom.getInstance("SHA1PRNG");
      String randomNum = new Integer( prng.nextInt() ).toString();
      byte[] randomBytes = randomNum.getBytes();
     
   /* I want to send the number here */
    }
    catch ( NoSuchAlgorithmException ex ) {
      System.err.println(ex);
    }
    }
    

