BeRTOS
|
00001 00040 #ifndef SEC_CIPHER_BLOWFISH_H 00041 #define SEC_CIPHER_BLOWFISH_H 00042 00043 #include <sec/cipher.h> 00044 #include <alloca.h> 00045 00046 typedef struct BlowfishContext 00047 { 00048 BlockCipher c; 00049 uint32_t S[4][256]; 00050 uint32_t P[18]; 00051 00052 } BlowfishContext; 00053 00054 void blowfish_init(BlowfishContext *ctx); 00055 00056 #define blowfish_stackinit(...) \ 00057 ({ BlowfishContext *ctx = alloca(sizeof(BlowfishContext)); blowfish_init(ctx, ##__VA_ARGS__); &ctx->c; }) 00058 00059 int blowfish_testSetup(void); 00060 int blowfish_testRun(void); 00061 int blowfish_testTearDown(void); 00062 00063 #endif /* SEC_CIPHER_BLOWFISH_H */