Blackberry Java Development Environment 4.6.0 매뉴얼 - 페이지 32
{카테고리_이름} Blackberry Java Development Environment 4.6.0에 대한 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. Blackberry Java Development Environment 4.6.0 36 페이지. Cryptographic smart card driver
Cryptographic Smart Card Driver Development Guide
}
}
}
Code sample: Storing the location of a private key file on the
smart card
Example: MyCryptoTokenData.java
/**
* MyCryptoTokenData.java
* Copyright (C) 2001-2007 Research In Motion Limited. All rights reserved.
*/
package com.rim.samples.device.smartcard;
import net.rim.device.api.crypto.*;
import net.rim.device.api.smartcard.*;
import net.rim.device.api.util.*;
/**
* This class stores the location of the private key file on the smart card.
*
*/
final class MyCryptoTokenData implements CryptoTokenPrivateKeyData, Persistable
{
/**
* Smart card containing the private key.
*/
private SmartCardID _id;
/**
* Location of the private key file on the smart card.
*/
private byte _file;
/**
* Constructs a new MyCryptoTokenData object
*
* @param id ID of the smart card containing the private key file
* @param file Location of the private key file.
*/
public MyCryptoTokenData( SmartCardID id, byte file )
{
_id = id;
_file = file;
}
28