SmartCardCryptoProvider::generateRandomData()

Return a buffer with random bytes.

Synopsis:

#include <smartcard_spi/SmartCardCryptoProvider.hpp>
virtual sc_response_code_t smartcard_spi::SmartCardCryptoProvider::generateRandomData(unsigned char *randomData, unsigned int &randomDataLength)

Since:

BlackBerry 10.3.0

Arguments:

randomData

A buffer for storing generated random data. If NULL is specified, the randomDataLength parameter may return the maximum number of bytes it can generate. If this feature is not supported, the function will return an error.

randomDataLength

On input, this parameter specifies the requested number of random bytes to generate. On output, this parameter returns the actual number of random bytes generated.

Library:

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

Description:

This function returns a buffer with random bytes generated by the card. The data produced by this function shall be cryptographically random.

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