BeRTOS
|
00001 00039 #ifndef SEC_HASH_MD5_H 00040 #define SEC_HASH_MD5_H 00041 00042 #include <sec/hash.h> 00043 #include <cfg/compiler.h> 00044 #include <alloca.h> 00045 00046 typedef struct 00047 { 00048 Hash h; 00049 uint32_t buf[4]; 00050 uint8_t in[64]; 00051 uint64_t bits; 00052 00053 } MD5_Context; 00054 00055 void MD5_init(MD5_Context *ctx); 00056 00057 #define MD5_stackinit(...) \ 00058 ({ MD5_Context *ctx = alloca(sizeof(MD5_Context)); MD5_init(ctx , ##__VA_ARGS__); &ctx->h; }) 00059 00060 int MD5_testSetup(void); 00061 int MD5_testRun(void); 00062 int MD5_testTearDown(void); 00063 00064 #endif /* SEC_HASH_MD5_H */