SmartCardCryptoProvider::decrypt()

Decrypt data in a single part.

Synopsis:

#include <smartcard_spi/SmartCardCryptoProvider.hpp>
virtual sc_response_code_t smartcard_spi::SmartCardCryptoProvider::decrypt(const unsigned char *ciphertext, unsigned int ciphertextLength, unsigned char *plaintext, unsigned int &plaintextLength)

Since:

BlackBerry 10.3.0

Arguments:

ciphertext

The input buffer containing the ciphertext to be decrypted; must not be NULL.

ciphertextLength

The ciphertext buffer length.

plaintext

The output buffer where the plaintext data will be written. If NULL, only the plaintext length will be returned.

plaintextLength

On input, this parameter specifies the plaintext buffer length. On output, this parameter specifies the plaintext length.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

This function decrypts encrypted data in a single part.

Algorithm specific notes:

  • RSA: No padding bytes are added or removed.

Depending on card driver implementation, this function may or may not be called multiple times without re-initializing.

Returns:

If the function succeeds, SC_SCARD_S_SUCCESS is returned. Otherwise, an error code is returned.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus