- ページ 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