BeRTOS
|
00001 00038 #ifndef SEC_KDF_PBKDF1_H 00039 #define SEC_KDF_PBKDF1_H 00040 00041 #include <sec/kdf.h> 00042 #include <sec/hash.h> 00043 00044 typedef struct 00045 { 00046 Kdf kdf; 00047 Hash *hash; 00048 uint32_t iterations; 00049 } PBKDF1_Context; 00050 00051 void PBKDF1_init(PBKDF1_Context *ctx, Hash *h); 00052 void PBKDF1_set_iterations(Kdf *kdf, uint32_t iterations); 00053 00054 #define PBKDF1_stackinit(...) \ 00055 ({ PBKDF1_Context *ctx = alloca(sizeof(PBKDF1_Context)); PBKDF1_init(ctx , ##__VA_ARGS__); &ctx->kdf; }) 00056 00057 int PBKDF1_testSetup(void); 00058 int PBKDF1_testRun(void); 00059 int PBKDF1_testTearDown(void); 00060 00061 #endif /* SEC_KDF_PBKDF1_H */