Implement a class to enable a communication session with a smart card
- Import the required crypto and smartcard libraries.
- Extend the abstract CryptoSmartCardSession class.
- Implement CryptoSmartCardSession.getKeyStoreDataArrayImpl() according to the BlackBerry
Device Software version of the target device.
To create a cryptographic smart card driver that is compatible with BlackBerry Device Software version 4.2 or later, implement CryptoSmartCardSession.getKeyStoreDataArrayImpl() as follows:
RSACryptoToken token = new MyRSACryptoToken(); RSACryptoSystem cryptoSystem = new RSACryptoSystem(token, 1024); RSAPrivateKey privateKey; PrivateKey privateKey = new RSAPrivateKey(cryptoSystem, new MyCryptoTokenData());
- To create a cryptographic smart card driver that is compatible with BlackBerry Device Software version 4.1 and version 4.2 or later, and to include the cryptographic smart card driver in two-factor authentication, implement the getKeyStoreDataArrayImp method as follows:
PrivateKey privateKey = CryptoSmartCardUtilities2.createPrivateKey(token, 1024, new MyCryptoTokenData());
- Implement CryptoSmartCardSession.getKeyStoreDataArrayImpl()
- Implement the other required CryptoSmartCardSession methods.
Previous topic: CryptoSmartCardSession methods you implement to create a
driver