⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkpasswd.h

📁 check password
💻 H
字号:

/*File: checkPasswd.h
*--------------------
*This part is the header of checkPasswd.c
*--------------------
*name:zhangjiwang
*ProjectName:checkPasswd
*time:2004-9-8
*/
#ifndef check_passwd_h

#define check_passwd_h

#include <stdio.h>
#include <string.h> 
#include <stdlib.h>
/*
*Constants
*---------
*ConfigCapacity--The capacity of the config file
*MIN--The minimum length of the password
*MaxLine--The max lines of the passwd forbidden file
*MaxPatternLen--The max charactors of the appendix or special string
*config--Stand by the config file "config.txt"
*speStr--Stand by the specialString file "PatterbAppendix.txt"
*forbiddenPasswdFile--Stand by the forbiddenPasswd file "patternPass.txt"
*ExtensionLen--The length of the string that has the same symbol,like "1111111","aaaaaaaaaaaa"
*ConfigState1--Stand by the state num of the ConfigState
*/
#define ConfigCapacity 20
#define MIN 8
#define MaxLine 100
#define MaxPatternLen 50
#define config "config.txt"
#define speStr "PatterbAppendix.txt"
#define forbiddenPasswdFile "patternPass.txt"
#define ExtensionLen 20
#define ConfigState1 "pifb"
#define ConfigState2 "mile"
#define ConfigState3 "uspa"
#define ConfigState4 "ndnl"
#define ConfigState5 "ppex"
#define ConfigState6 "sspa"
#define ConfigState7 "usex"

struct configstate
//
//store the state and name of one config
//
{
	char configName[20];
	char configState[20];
};
//
//Function prototypes
//
int readConfigFile(char* FileName);	
int readForbidPasswdFile(char *forbidPasswdFile);
int checkPasswordAppendix(char *userName,char *passWord,char *specialStr);
int checkIfForbidden(char *passWord);
int checkMinLen(char *passWord,int minimum);
int checkIfSame(char *userName,char* passWord);
int checkAllDigitsOrAllLetters(char *passWord);
int checkSymbol(char *passWord);
int checkPasswd(char* userName,char* passWord);
int judgeConfigState(char *configName);
int StringToDigit(char *str);
void putStringToArray(char *str,int confStateNum);

//
//The description of these fuctions can be found in the "checkPasswd.c"
//
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -