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