Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Manual page 11

Cryptographic smart card driver
Table of Contents

Advertisement

Task
Determine if the token object and the
CryptoSystem
support the type of
encryption scheme.
Enable decryption of unprocessed data.
Steps
>
Perform one of the following steps:
To create a cryptographic smart card driver that is compatible with BlackBerry Device
Software Version 4.2 or later, create a method that returns a Boolean value that indicates if
the token object supports the specified encryption scheme.
public boolean isSupportedDecryptRSA(RSACryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData)throws
CryptoTokenException
{
return privateKeyData instanceof 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, create a method that returns a Boolean value that
indicates if the token object supports the specified encryption scheme.
public boolean isSupportedDecryptRSASmartCardImpl( CryptoSystem
cryptoSystem,CryptoTokenPrivateKeyData privateKeyData);
>
Perform one of the following steps:
To create a cryptographic smart card driver that is compatible with BlackBerry Device
Software Version 4.2 or later, create a method that performs decryption of unprocessed data,
for example:
public void decryptRSA(RSACryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData,byte[] input, int
inputOffset,
byte[] output, int outputOffset)throws CryptoTokenException
{
try {//signDecryptHelper is a private helper method.
signDecryptHelper(cryptoSystem, privateKeyData, input, inputOffset,
output, outputOffset, DECRYPT_DESC,
SmartCardSession.DECRYPT_OPERATION);
}
catch (CryptoUnsupportedOperationException e) {
throw new CryptoTokenException(e.toString());
}
}
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, create a method that performs decryption of unprocessed
data, for example:
public void decryptRSASmartCardImplCryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData, byte[] input, int
inputOffset, byte[] output,int outputOffset)
1: Using smart cards
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents