CRYPT_ECC_PublicImport Function

C

int CRYPT_ECC_PublicImport(
    CRYPT_ECC_CTX* ecc, 
    const unsigned char* in, 
    unsigned int inSz
);

Description

This function imports a public key in ANSI X9.63 format into the ECC context.

Preconditions

The ECC context must have previously been initialized with a call to CRYPT_ECC_Initialize.

Parameters

Parameters Description
ecc Pointer to context which saves state between calls.
in Input buffer that holds the public key.
inSz Size of the input buffer, in bytes.

Returns

Remarks

None.

Example

CRYPT_ECC_CTX userB; 
int           ret;
byte          sharedA[100];
unsigned int  aSz = (unsigned int)sizeof(sharedA);
unsigned int  usedA;

ret = CRYPT_ECC_Initialize(&userB);
...
ret = CRYPT_ECC_PublicImport(&userB, sharedA, usedA);