Subversion Repositories zxusbnet

Rev

Rev 47 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. /**
  2.  * support MD5 for PPPoE CHAP mode
  3.  */
  4.  
  5. #ifndef __MD5_H
  6. #define __MD5_H
  7.  
  8. #include "types.h"
  9.  
  10. /* MD5 context. */
  11. typedef struct {
  12.         uint32 state[4];    /* state (ABCD)                            */
  13.         uint32 count[2];    /* number of bits, modulo 2^64 (lsb first) */
  14.         uint8  buffer[64];  /* input buffer                            */
  15.       } md5_ctx;
  16.  
  17. extern void md5_init(md5_ctx *context);
  18. extern void md5_update(md5_ctx *context, uint8 *buffer, uint32 length);
  19. extern void md5_final(uint8 result[16], md5_ctx *context);
  20.  
  21. #endif  // __md5_H
  22.