BeRTOS
|
00001 00038 #ifndef SEC_PRNG_X917_H 00039 #define SEC_PRNG_X917_H 00040 00041 #include <sec/prng.h> 00042 #include <sec/cipher/aes.h> 00043 00044 typedef struct X917Context 00045 { 00046 PRNG rng; 00047 uint8_t key[16]; 00048 uint8_t state[16]; 00049 00050 } X917Context; 00051 00052 void x917_init(X917Context *ctx); 00053 00054 #define x917_stackinit(...) \ 00055 ({ X917Context *ctx = alloca(sizeof(X917Context)); x917_init(ctx, ##__VA_ARGS__); &ctx->rng; }) 00056 00057 00058 #endif /* SEC_CSPRNG_X917_H */