http_digest.h
来自「AMLOGIC DPF source code」· C头文件 代码 · 共 57 行
H
57 行
/*******************************************************************
*
* Copyright C 2005 by Amlogic, Inc. All Rights Reserved.
*
* Description: HTTP Digest authentication from RFC2617
*
* Author: Eric Knudstrup
* Created: Tue Apr 5 12:01:40 2005
*
*******************************************************************/
#ifndef HTTP_DIGEST_H
#define HTTP_DIGEST_H
#define HASHLEN 16
typedef uint8_t HASH[HASHLEN];
#define HASHHEXLEN 32
typedef uint8_t HASHHEX[HASHHEXLEN+1];
/**
* Create an HTTP 1.1 RFC2617 Authorization header and insert it into
* the client as a static header that will be transmitted for
* each request.
* Currently only the "MD5" algorithm and "auth" Qop are supported.
*
* @param [in] client HTTP Client.
* @param [in] char * Algorithm,
* @param [in] char * UserName,
* @param [in] char * Realm,
* @param [in] char * Password,
* @param [in] char * Nonce,
* @param [in] char * CNonce,
* @param [in] char * Qop, qop-value: "", "auth"
* @param [in] char * Method, method from the request ("GET")
* @param [in] char * DigestUri, requested URL
* @param [in] HASHHEX HEntity, H(entity body) if qop="auth-int"
*
* @returns TRUE if the Authorization header was successfully created
* and added to client.
*/
extern int
http_create_digest_auth(HTTPTcpConnection_t *client,
char * Algorithm,
char * UserName,
char * Realm,
char * Password,
char * Nonce, /* nonce from server */
char * NonceCount, /* 8 hex digits */
char * CNonce, /* client nonce */
char * Qop, /* qop-value: "", "auth", "auth-int" */
char * Method, /* method from the request */
char * DigestUri, /* requested URL */
HASHHEX HEntity); /* H(entity body) if qop="auth-int" */
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?