BeRTOS
|
00001 00038 #ifndef SEC_MAC_HMAC_H 00039 #define SEC_MAC_HMAC_H 00040 00041 #include <sec/mac.h> 00042 #include <sec/hash.h> 00043 00044 #include <alloca.h> 00045 00046 typedef struct HmacContext 00047 { 00048 Mac m; 00049 Hash *h; 00050 uint8_t key[64]; 00051 } HmacContext; 00052 00053 void hmac_init(HmacContext* hmac, Hash *h); 00054 00055 #define hmac_stackinit(...) \ 00056 ({ HmacContext *ctx = alloca(sizeof(HmacContext)); hmac_init(ctx, ##__VA_ARGS__); &ctx->m; }) 00057 00058 int hmac_testSetup(void); 00059 int hmac_testRun(void); 00060 int hmac_testTearDown(void); 00061 00062 #endif /* SEC_MAC_HMAC_H */