Package net.rim.device.api.smartcard

Examples of net.rim.device.api.smartcard.CommandAPDU


     * Implementation should not bring up UI.
     */
    protected boolean loginImpl(final String password)
            throws SmartCardException {
        // TODO: Create a CommandAPDU which your smart card will understand.
        final CommandAPDU command =
                new CommandAPDU((byte) 0x00, (byte) 0x20, (byte) 0x00,
                        (byte) 0x00);
        command.setLcData(password.getBytes());

        final ResponseAPDU response = new ResponseAPDU();

        sendAPDU(command, response);

View Full Code Here


     * Returns random bytes of data from the smart card's internal RNG.
     */
    protected byte[] getRandomBytesImpl(final int maxBytes)
            throws SmartCardException {
        // TODO: Create a CommandAPDU which your smart card will understand.
        final CommandAPDU command =
                new CommandAPDU((byte) 0x00, (byte) 0x4C, (byte) 0x00,
                        (byte) 0x00, maxBytes);

        final ResponseAPDU response = new ResponseAPDU();

        sendAPDU(command, response);
View Full Code Here

        // Construct the response Application Protocol Data Unit.
        final ResponseAPDU response = new ResponseAPDU();

        // Construct the command and set its information.
        // TODO: Create a CommandAPDU which your smart card will understand.
        final CommandAPDU signAPDU =
                new CommandAPDU((byte) 0x80, (byte) 0x56, (byte) 0x00,
                        (byte) 0x00, modulusLength);
        signAPDU.setLcData(input, inputOffset, input.length - inputOffset);

        // Send the command to the smart card
        sendAPDU(signAPDU, response);

        // Validate the status words of the response.
View Full Code Here

TOP

Related Classes of net.rim.device.api.smartcard.CommandAPDU

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.