#pragma once #ifndef _md5_h_ #define _md5_h_ #ifdef __cplusplus extern "C" { #endif #include "define_inc.h" #define NC "00000001" #define NONCE "00002519Y133420c5abff33aba54b089560776d2ef567b" #define CNONCE "5686cd1776c590c35b90fac63835bb95" #define MD5_RESP_LEN (33) //32 + 1('\0') #define MAX_MD5_BUF_LEN (2048) // refer to uri (like server_file(2048) in httpc_client) void DoMD5(unsigned char *in ,unsigned char *out); void DoDigestUserhash( const char *username, const char *realm, char *response ); int DoDigestResponse( const char *username, const char *realm, const char *password, const char *method, const char *uri, const char *nonce, char *response ); //QOP "quality of protection" int DoQOPDigestResponse(const char *username ,const char * password, const char * realm, const char * uri, const char *method,const char * nonce,char * response); #ifdef __cplusplus } #endif #endif