hu_IDLCParamsGet()

Retrieves settings from an IDLC parameters object.

Synopsis:

#include "huidlc.h"
 
int hu_IDLCParamsGet(sb_Params idlcParams, size_t *pSize, size_t *qSize, size_t *pLength, unsigned char *p, size_t *gLength, unsigned char *g, size_t *qLength, unsigned char *q, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

idlcParams

An IDLC parameters object.

pSize

The length (in bits) of the prime modulus p.

qSize

The length (in bits) of the prime divisor q, if using. Otherwise, the length (in bits) of the private keys.

pLength

The length (in bytes) of the prime modulus.

p

Prime modulus.

gLength

The length (in bytes) of the generator. Equal to pLength.

g

Generator of order q.

qLength

The length (in bytes) of the prime divisor, if using. Otherwise, 0 will be returned.

q

Prime divisor of p-1, if using.

sbCtx

A global context.

Library:

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

Description:

If the length of a parameter is known, a pointer to a buffer large enough to hold the parameter should be passed in the appropriate argument and its length in the corresponding length argument. This function will copy the value into the buffer and set the actual length of the value in the length argument.

If a parameter argument is NULL, this function will set the correct length of the parameter in the length argument. If the argument is not NULL but the corresponding length argument is too small, this function will return an error.

Set both the parameter argument and its length to NULL for any parameters that are to be ignored.

Returns:

SB_ERR_NULL_PARAMS

The idlcParams object is NULL.

SB_ERR_BAD_PARAMS

The tag for the params object is not of the expected type.

SB_ERR_BAD_OUTPUT_BUF_LEN

The length of the output buffer is invalid.

SB_SUCCESS

Success.