Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 831 Bytes

GUID-CABC8C76-4D33-4814-B39A-7E63C27F4341.md

File metadata and controls

48 lines (28 loc) · 831 Bytes

CRYPT_ECC_Initialize Function

Parent topic:MPLAB® Harmony Crypto Library

C

int CRYPT_ECC_Initialize(
    CRYPT_ECC_CTX* ecc
);

Description

This function initializes the context used for Elliptic Curve Cryptography (ECC). The context is then passed to calls to perform key building, encryption, decryption, etc.

Preconditions

None.

Parameters

Parameters Description
ecc Pointer to context to initialize.

Returns

  • BAD_FUNC_ARG - An invalid pointer was passed to the function.

  • -1 - Unable to allocate memory for the keys.

  • 0 - An invalid pointer was not passed to the function.

Remarks

None.

Example

CRYPT_ECC_CTX userA; 
int           ret;

ret = CRYPT_ECC_Initialize(&userA);