project_files/frontlib/md5/md5.h
changeset 8260 83d85e32c713
parent 7269 5b0aeef8ba2a
child 8330 aaefa587e277
equal deleted inserted replaced
8258:c14b27abe452 8260:83d85e32c713
    61  */
    61  */
    62 
    62 
    63 typedef unsigned char md5_byte_t; /* 8-bit byte */
    63 typedef unsigned char md5_byte_t; /* 8-bit byte */
    64 typedef unsigned int md5_word_t; /* 32-bit word */
    64 typedef unsigned int md5_word_t; /* 32-bit word */
    65 
    65 
    66 /* Define the state of the MD5 Algorithm. */
    66 /*! Define the state of the MD5 Algorithm. */
    67 typedef struct md5_state_s {
    67 typedef struct md5_state_s {
    68     md5_word_t count[2];	/* message length in bits, lsw first */
    68     md5_word_t count[2];	/*! message length in bits, lsw first */
    69     md5_word_t abcd[4];		/* digest buffer */
    69     md5_word_t abcd[4];		/*! digest buffer */
    70     md5_byte_t buf[64];		/* accumulate block */
    70     md5_byte_t buf[64];		/*! accumulate block */
    71 } md5_state_t;
    71 } md5_state_t;
    72 
    72 
    73 #ifdef __cplusplus
    73 #ifdef __cplusplus
    74 extern "C" 
    74 extern "C" 
    75 {
    75 {
    76 #endif
    76 #endif
    77 
    77 
    78 /* Initialize the algorithm. */
    78 /*! Initialize the algorithm. */
    79 void md5_init(md5_state_t *pms);
    79 void md5_init(md5_state_t *pms);
    80 
    80 
    81 /* Append a string to the message. */
    81 /*! Append a string to the message. */
    82 void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
    82 void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
    83 
    83 
    84 /* Finish the message and return the digest. */
    84 /*! Finish the message and return the digest. */
    85 void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
    85 void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
    86 
    86 
    87 #ifdef __cplusplus
    87 #ifdef __cplusplus
    88 }  /* end extern "C" */
    88 }  /* end extern "C" */
    89 #endif
    89 #endif