📄 wpw_auth.h
字号:
/************************************************************************
*
* CopyrIght (c) 1993 - 2001 Accelerated Technology, Inc.
*
* PROPRIETARY RIGHTS of Accelerated Technology are involved in the subject
* matter of this material. All manufacturing, reproduction, use and sales
* rights pertaining to this subject matter are governed by the license
* agreement. The recipient of this software implicity accepts the terms
* of the license.
*
*************************************************************************/
/************************************************************************
*
* FILE NAME VERSION
*
* wpw_auth.h 1.5
*
* COMPONENT
*
* Nucleus WebServ
*
* DESCRIPTION
*
* This file contains the linked list defines used in manipulating
* the authentication structure for multiple linked lists.
*
* DATA STRUCTURES
*
* WPW_AUTH_NODE Holds user ID with associated password
* WPW_INFO_NODE Entry into the authentication string
* WPW_INFO_LIST Defines the head of the linked list of
* the Nucleus WebServ authentication
* password structure
*
* FUNCTIONS
*
* None
*
* DEPENDENCIES
*
* None
*
************************************************************************/
#ifndef _WPW_AUTH_H
#define _WPW_AUTH_H
#ifdef __cplusplus
extern "C" { /* C declarations in C++ */
#endif
#define WPW_BASIC_AUTH_FAILED -1
#define WPW_BASIC_MAX_SIZE 76
#define WPW_SRG_SIZE 128
#define WPW_SALT_BYTES 16
/* Structure to hold the user_id and password for Authetication
* algorithm
*/
struct WPW_AUTH_NODE{
CHAR wpw_user_id[32];
CHAR wpw_password[32];
};
/* This structure defines An entry into the Basic Authentication string. */
typedef struct _WPW_INFO_NODE
{
struct _WPW_INFO_NODE *wpw_list_next; /* Next PW Pointer */
struct _WPW_INFO_NODE *wpw_list_previous; /* Previous PW Pointer */
CHAR wpw_user[32]; /* user id */
CHAR wpw_password[32]; /* Password */
} WPW_INFO_NODE;
/* Define the head of the linked list of the Nucleus WebServ Basic
* Authetication Password structure.
*/
typedef struct _WPW_INFO_LIST
{
WPW_INFO_NODE *wpw_list_head; /* Basic Password List Head */
WPW_INFO_NODE *wpw_list_tail; /* Basic Passowrd List Tail */
} WPW_INFO_LIST;
/* Function Prototypes for Nucleus WebServ Basic Authentication */
#ifdef WS_BASIC_AUTH
INT16 BSC_Auth_Init(VOID);
STATUS BSC_Parse_Auth(WS_REQUEST *req);
UINT8 *BSC_Base64_Decode(UINT8 *total_char, UINT8 *final_decode);
INT16 BSC_Auth_Add_Entry(CHAR *user_id, CHAR *password);
INT16 BSC_Auth_Delete_Entry(CHAR *user_id, CHAR *password);
#endif
/* Function prototypes for DES Authentication */
#ifdef WS_AUTHENTICATION
VOID DES_Auth_Initialize(VOID);
VOID ENC_Decrypt(CHAR * key, CHAR * data, INT blocks );
VOID ENC_Encrypt(CHAR * key, CHAR * data, INT blocks );
#endif
#ifdef __cplusplus
}
#endif /* _cplusplus */
#endif /* _DES_AUTH_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -