Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Guide de dépannage Page 99

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 286
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 98
99
5: Using smart cards
private static final String LABEL = “RIM Sample”;
private static final String DISPLAY_SETTINGS = “Show driver properties/settings now”;
private static final String RSA = “RSA”;
/**
* Called on startup of the device. Register this driver with the smart card factory.
* When you do this, you are automatically registered with the user authenticator
* framework.
*/
public static void libMain( String args[] )
{
SmartCardFactory.addSmartCard( new MyCryptoSmartCard() );
}
/**
* Retrieve the session handler for this smart card.
* Implementations of this method should not bring up UI.
*/
protected SmartCardSession openSessionImpl( SmartCardReaderSession readerSession )
throws SmartCardException {
return new MyCryptoSmartCardSession( this, readerSession );
}
/**
* Determine if the file system should use this smart card object
* to communicate with a physical smart card.
* that has the given AnswerToReset.
* The system invokes this method to ascertain which smart card implementation it should
* use to communicate with a physical smart card found in a reader.
*/
protected boolean checkAnswerToResetImpl( AnswerToReset atr )
{
return _myATR.equals( atr );
}
/**
* Retrieve a label associated with this smart card.
* The string should not include the words “smart card”, as the file system uses this
* this method to generate strings such as “Please insert your smart card”.
*/
protected String getLabelImpl()
{
return LABEL;
}
/**
* Retrieves this smart card’s capabilities
*/
protected SmartCardCapabilities getCapabilitiesImpl()
{
return new SmartCardCapabilities( SmartCardCapabilities.PROTOCOL_T0 );
}
Vue de la page 98
1 2 ... 94 95 96 97 98 99 100 101 102 103 104 ... 285 286

Commentaires sur ces manuels

Pas de commentaire