From fa30ab37b3c9d4c7c31c4ccde0977849b7937a9e Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Fri, 16 Sep 2022 15:54:32 -0500 Subject: [PATCH] Add reference to wc_AesInit in Gmac API doc --- doc/dox_comments/header_files/aes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/dox_comments/header_files/aes.h b/doc/dox_comments/header_files/aes.h index 2f87de88e..57875bc81 100644 --- a/doc/dox_comments/header_files/aes.h +++ b/doc/dox_comments/header_files/aes.h @@ -455,10 +455,12 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, \code Gmac gmac; key[] = { some 16, 24, or 32 byte length key }; + wc_AesInit(gmac.aes, HEAP_HINT, INVALID_DEVID); // Make sure devId updated wc_GmacSetKey(&gmac, key, sizeof(key)); \endcode \sa wc_GmacUpdate + \sa wc_AesInit */ int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len); @@ -486,6 +488,7 @@ int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len); key[] = { some 16, 24, or 32 byte length key }; iv[] = { some 16 byte length iv }; + wc_AesInit(gmac.aes, HEAP_HINT, INVALID_DEVID); // Make sure devId updated wc_GmacSetKey(&gmac, key, sizeof(key)); authIn[] = { some 16 byte authentication input }; tag[AES_BLOCK_SIZE]; // will store authentication code @@ -495,6 +498,7 @@ int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len); \endcode \sa wc_GmacSetKey + \sa wc_AesInit */ int wc_GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz, const byte* authIn, word32 authInSz,