md2.h

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