Blackberry Java Development Environment 4.6.0 매뉴얼 - 페이지 30
{카테고리_이름} 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
* @param input Input data.
* @param inputOffset First byte of the input data to read.
* @param output Buffer for the output data.
* @param outputOffset Position in the output buffer to receive the first written byte.
*
* @throws CryptoTokenException Thrown if an error occurs with a crypto
* token or the crypto token is invalid.
*/
public void decryptRSA( RSACryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData,byte[] input, int inputOffset,
byte[] output, int outputOffset )throws CryptoTokenException
{
try {
signDecryptHelper( cryptoSystem, privateKeyData, input, inputOffset, output,
outputOffset, DECRYPT_DESC, SmartCardSession.DECRYPT_OPERATION );
}
catch ( CryptoUnsupportedOperationException e ) {
throw new CryptoTokenException( e.toString() );
}
}
/**
* Perform RSA signing of unprocessed data.
*
* <p>
* Notes: The RSA Crypto token should perform a raw RSA private key operation on the
* input data. The input data is typically padded, with the type of padding dependent on
* the application that requested the signature.
Standards (PKCS) #1 version 2.0
* is used to pad the data, however other schemes such as Probabilistic Signature Scheme
(PSS) or ANSI X9.31 could also
* be used.
*
* If the RSA Crypto token requires the padding to be removed before signing, this method
* will need to detect and remove the type of padding that is currently used.
* Crypto token should only re-apply the same type of padding that was originally applied
* to the data. If the RSA Crypto token is unable to re-apply the same type of padding,
* this method should throw an UnsupportedOperationException.
* Signature requests which come from BlackBerry's S/MIME implementation currently use
* Public-Key Cryptography Standards (PKCS) #1 padding but may use other padding methods
in the future.
* <p>
* @param cryptoSystem Cypto system associated with the token.
* @param privateKeyData RSA private key.
* @param input Input data.
* @param inputOffset First byte of the input data to read.
* @param output The buffer for the output data.
* @param outputOffset Position in the output buffer to receive the first written byte.
* @throws CryptoTokenException Thrown if an error occurs with the crypto
* token or the crypto token is invalid.
* @throws CryptoUnsupportedOperationException Thrown if a call is made to an
* unsupported operation or if the token does not support signing due to the type of
* padding around the encoded message.
*/
public void signRSA(
privateKeyData, byte[] input, int inputOffset,byte[] output, int outputOffset )
throws CryptoTokenException, CryptoUnsupportedOperationException
26
RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData
Typically Public-Key Cryptography
The RSA