hu_ECCalcECPointGet()

Obtain value from an elliptic curve point object.

Synopsis:

#include "hueccalc.h"
 
int hu_ECCalcECPointGet(sb_Params eccParams, sb_ECCalcECPoint point, size_t *pointLen, unsigned char *pointValue, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

ECC parameters object.

point

The elliptic curve point object.

pointLen

The length (in bytes) of the elliptic curve point buffer.

pointValue

The elliptic curve point 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 point value will be set in the output buffer, and the length is set in the length parameter. The elliptic curve point value is represented in the octet string format.

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 pointValue to NULL. The length is set in the pointLen parameter.

Returns:

SB_ERR_NULL_PARAMS

ECC parameters object is NULL.

SB_ERR_BAD_PARAMS

ECC parameters object is invalid.

SB_ERR_NULL_ECPOINT

The elliptic curve point objects is NULL.

SB_ERR_BAD_ECPOINT

The elliptic curve point 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 elliptic curve point buffer length is invalid.

SB_SUCCESS

Success.