projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update sd project.
[bertos.git]
/
bertos
/
sec
/
mac
/
hmac.h
diff --git
a/bertos/sec/mac/hmac.h
b/bertos/sec/mac/hmac.h
index c22a695b90b5330ac8b87acabeedffece54e0124..8e0b35732d71f4757fba5eb78a851b0fa210a273 100644
(file)
--- a/
bertos/sec/mac/hmac.h
+++ b/
bertos/sec/mac/hmac.h
@@
-32,7
+32,7
@@
*
* \brief HMAC (RFC 2104) implementation
* \author Giovanni Bajo <rasky@develer.com>
*
* \brief HMAC (RFC 2104) implementation
* \author Giovanni Bajo <rasky@develer.com>
- *
+ *
*/
#ifndef SEC_MAC_HMAC_H
*/
#ifndef SEC_MAC_HMAC_H
@@
-41,17
+41,22
@@
#include <sec/mac.h>
#include <sec/hash.h>
#include <sec/mac.h>
#include <sec/hash.h>
-typedef struct HMAC_Context
+#include <alloca.h>
+
+typedef struct HmacContext
{
Mac m;
{
Mac m;
- Hash *h;
+ Hash *h;
uint8_t key[64];
uint8_t key[64];
-} HMAC_Context;
+} HmacContext;
+
+void hmac_init(HmacContext* hmac, Hash *h);
-void HMAC_init(HMAC_Context* hmac, Hash *h);
+#define hmac_stackinit(...) \
+ ({ HmacContext *ctx = alloca(sizeof(HmacContext)); hmac_init(ctx, ##__VA_ARGS__); &ctx->m; })
-int
HMAC
_testSetup(void);
-int
HMAC
_testRun(void);
-int
HMAC
_testTearDown(void);
+int
hmac
_testSetup(void);
+int
hmac
_testRun(void);
+int
hmac
_testTearDown(void);
#endif /* SEC_MAC_HMAC_H */
#endif /* SEC_MAC_HMAC_H */