SmartCardCryptoProvider::sign()

Perform a signing operation.

Synopsis:

#include <smartcard_spi/SmartCardCryptoProvider.hpp>
virtual sc_response_code_t smartcard_spi::SmartCardCryptoProvider::sign(const unsigned char *data, unsigned int dataLength, unsigned char *signature, unsigned int &signatureLength)

Since:

BlackBerry 10.3.0

Arguments:

data

The input buffer containing the data to be signed; must not be NULL.

dataLength

The data buffer length.

signature

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

signatureLength

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

Library:

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

Description:

This function performs a signing operation.

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