hu_ECCalcOrderIntGet()

Obtain integer value from point order integer object.

Synopsis:

#include "hueccalc.h"
 
int hu_ECCalcOrderIntGet(sb_Params eccParams, sb_ECCalcOrderInt orderInt, size_t *orderIntLen, unsigned char *orderIntValue, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

ECC parameters object.

orderInt

The point order integer object.

orderIntLen

The length (in bytes) of the point order integer buffer.

orderIntValue

The point order integer buffer.

sbCtx

SB context or memory callback data.

Library:

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

Description:

If the output buffer is sufficiently large, the integer value will be set in the output buffer, and the length is set in the length parameter. The integer value is represented in the octet string format (as a finite field element).

If the output buffer is not sufficient, an error is returned, and the necessary (correct) size is set in the length parameter.

In order to retrieve the necessary size of the output buffer, set orderIntValue to NULL. The length is set in the orderIntLen parameter.

Returns:

SB_ERR_NULL_PARAMS

ECC parameters object is NULL.

SB_ERR_BAD_PARAMS

ECC parameters object is invalid.

SB_ERR_NULL_ORDER_INT

The point order integer objects is NULL.

SB_ERR_BAD_ORDER_INT

The point order integer object is invalid.

SB_ERR_NULL_OUTPUT_BUF_LEN_PTR

The length pointer of the value buffer is NULL.

SB_ERR_BAD_OUTPUT_BUF_LEN

The point order integer buffer length is invalid.

SB_SUCCESS

Success.