Sets the input policy and output format of elliptic curve point representations in the ECC parameters object.
#include "huecc.h"
int hu_ECCParamsModeSet(int policy, int mode, sb_Params eccParams, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
Point compression input policy.
Point compression output mode.
An ECC parameters object.
A global context.
This function affects all functions that accept elliptic curve point representations as input or produce them as output (e.g. creation of elliptic curve key objects).
By default, elliptic curve points can be passed as input in any supported representation; on output, they will be returned in compressed representation.
The mode can be set to change the output format of elliptic curve points. The policy can be set to either accept points in any supported representation, or, to reject input that is not in the same representation chosen for output. A detailed discussion of elliptic curve points and point compression may be found in the "Point Compression" section of the Security Builder API User's Guide.
For example, if the input policy is SB_ECC_POINT_INPUT_REJECT and the output mode is SB_ECC_COMPRESSION_OFF, then elliptic curve points will be returned in uncompressed representation, and only uncompressed points will be accepted as input.
A more detailed discussion of elliptic curve points and point compression is contained in the "Point Compression" section of the Security Builder API User's Guide.
The policy or mode is invalid.
The eccParams object is NULL.
The tag for the params object is not of the expected type.
Success.