md2.h
Go to the documentation of this file.00001 00047 #ifndef ALGO_MD2_H 00048 #define ALGO_MD2_H 00049 00050 #include <cfg/compiler.h> 00051 #include <appconfig.h> 00052 00053 #define NUM_COMPUTE_ROUNDS 18 00054 #define COMPUTE_ARRAY_LEN CONFIG_MD2_BLOCK_LEN * 3 00055 #define MD2_DIGEST_LEN CONFIG_MD2_BLOCK_LEN 00056 00059 typedef struct Md2Context 00060 { 00061 uint8_t buffer[CONFIG_MD2_BLOCK_LEN]; 00062 uint8_t state[CONFIG_MD2_BLOCK_LEN]; 00063 uint8_t checksum[CONFIG_MD2_BLOCK_LEN]; 00064 size_t counter; 00065 00066 } Md2Context; 00067 00068 void md2_init(Md2Context *context); 00069 void md2_update(Md2Context *context, const void *block_in, size_t block_len); 00070 uint8_t *md2_end(Md2Context *context); 00071 bool md2_test(void); 00072 00073 #endif /* ALGO_MD2_H */
