X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fsec%2Fhash%2Fsha1.h;h=eff7fa70df8fb9da8e95efb93c13c181a369306c;hb=4d8a6a97c6c0e15296b51d5f02674079bede1aa0;hp=734779ab3e048524b62a86cd72b5b9762b7aefe3;hpb=445cd93e07bcff480cda9af7d2319832e3c79fa3;p=bertos.git diff --git a/bertos/sec/hash/sha1.h b/bertos/sec/hash/sha1.h index 734779ab..eff7fa70 100644 --- a/bertos/sec/hash/sha1.h +++ b/bertos/sec/hash/sha1.h @@ -41,6 +41,7 @@ #include #include +#include /** * Context for SHA1 computation. @@ -54,6 +55,9 @@ typedef struct { void SHA1_init(SHA1_Context *context); +#define SHA1_stackinit(...) \ + ({ SHA1_Context *ctx = alloca(sizeof(SHA1_Context)); SHA1_init(ctx, ##__VA_ARGS__); &ctx->h; }) + int SHA1_testSetup(void); int SHA1_testRun(void); int SHA1_testTearDown(void);