X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fsec%2Fmac%2Fhmac.h;h=88de9fab135ebbd13bbfaffb4f789fd9ecaafa82;hb=4daa23797d71debc7f85987f76ba2c69ef6cd8a1;hp=c22a695b90b5330ac8b87acabeedffece54e0124;hpb=ffcd73346399453a46d47c920545a10885ed42f9;p=bertos.git diff --git a/bertos/sec/mac/hmac.h b/bertos/sec/mac/hmac.h index c22a695b..88de9fab 100644 --- a/bertos/sec/mac/hmac.h +++ b/bertos/sec/mac/hmac.h @@ -40,6 +40,7 @@ #include #include +#include typedef struct HMAC_Context { @@ -50,6 +51,9 @@ typedef struct HMAC_Context void HMAC_init(HMAC_Context* hmac, Hash *h); +#define HMAC_stackinit(...) \ + ({ HMAC_Context *ctx = alloca(sizeof(HMAC_Context)); HMAC_init(ctx, ##__VA_ARGS__); &ctx->m; }) + int HMAC_testSetup(void); int HMAC_testRun(void); int HMAC_testTearDown(void);