Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 764 Bytes

GUID-B9F49973-D71C-475B-82F3-23BBACC3DEE1.md

File metadata and controls

44 lines (26 loc) · 764 Bytes

CRYPT_RSA_Initialize Function

Parent topic:MPLAB® Harmony Crypto Library

C

int CRYPT_RSA_Initialize(
    CRYPT_RSA_CTX* rsa
);

Description

This function initializes the context used during public-key RSA encryption and decryption.

Preconditions

None.

Parameters

Parameters Description
rsa Pointer to RSA context which saves state between calls.

Returns

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

  • -1 - Unable to allocate the memory necessary for the key.

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

Example

CRYPT_RSA_CTX mcRsa;
int           ret;

ret = CRYPT_RSA_Initialize(&mcRsa);