Document use of wc_AesFree()

This commit is contained in:
kaleb-himes 2023-03-13 11:50:28 -06:00
parent e8828574ea
commit 5bbdda6895

View File

@ -855,7 +855,8 @@ int wc_AesXtsFree(XtsAes* aes);
/*!
\ingroup AES
\brief Initialize Aes structure. Sets heap hint to be used and ID for use
with async hardware
with async hardware. It is up to the user to call wc_AesFree on the Aes
structure when done.
\return 0 Success
\param aes aes structure in to initialize
@ -875,9 +876,37 @@ int wc_AesXtsFree(XtsAes* aes);
\sa wc_AesSetKey
\sa wc_AesSetIV
\sa wc_AesFree
*/
int wc_AesInit(Aes* aes, void* heap, int devId);
/*!
\ingroup AES
\brief free resources associated with the Aes structure when applicable.
Internally may sometimes be a no-op but still recommended to call in all
cases as a general best-practice (IE if application code is ported for use
on new environments where the call is applicable).
\return no return (void function)
\param aes aes structure in to free
_Example_
\code
Aes enc;
void* hint = NULL;
int devId = INVALID_DEVID; //if not using async INVALID_DEVID is default
//heap hint could be set here if used
wc_AesInit(&aes, hint, devId);
// ... do some interesting things ...
wc_AesFree(&aes);
\endcode
\sa wc_AesInit
*/
int wc_AesFree(Aes* aes);
/*!
\ingroup AES