CRYPTO_SetMemAllocator

Syntax


#include <nitro/crypto.h>

void CRYPTO_SetMemAllocator(
void* (*alloc) (u32),
void  (*free) (void*),
void* (*realloc) (void*,u32,u32)
);
		

Arguments

alloc Pointer to the memory allocation function.
free Pointer to the memory release function.
realloc Pointer to the memory size changing function.

Return Values

None.

Description

Sets the dynamic memory management functions for the CRYPTO library.
If these are not set, OS_Alloc, OS_Free, and the memory size changing function implemented using these functions will be used by default.
Specifying NULL for the alloc, free, and realloc arguments results in default settings.

When using the digital signature functions (the CRYPTO_VerifySignature* functions), alloc and free are used. When using RSA the encryption functions (the CRYPTO_RSA_* functions), alloc, free, and realloc are used.

See Also

CRYPTO_SetAllocator

Revision History

2008/03/27 Initial version.


CONFIDENTIAL