//the structure
extern RSPTYP *dig_parseresp(char *response);
-//procedure to convert a string to a 128 Bit sequence
-//as a string
+//procedure to hash (md5) a string result is a MD5 arrays
extern MD5TYP *dig_hashmd5(unsigned char *seq,unsigned int length);
+//procedure to convert an MD5 string (HEXA representation)
+//to an pure MD5TYP structure
+extern MD5TYP *dig_get_plain_md5(char *hexa);
+
//Procedure to crypt a string with MD5 hash function
extern char *dig_cryptmd5(const void *key,unsigned char *seq);
status=0;
params=(ARGTYP *)0;
+foreground=true;
phase=0;
proceed=true;
while (proceed==true) {
break;
case 1 : //check if we have file to scan
if (params->argc!=2) {
- (void) rou_alert(0,"Unable to proceed with test\n");
- (void) rou_alert(0,"\tthe test pattern number should be 2\n");
+ (void) rou_alert(0,"Unable to proceed with test");
+ (void) rou_alert(0,"\tthe test pattern number should be 2");
+ (void) rou_alert(0,"\tsee Makefile 'tstmd5:' entry as example");
status=-1;
phase=999;
}
break;
case 3 : //doing main task
status=chkresponse(params->argc,params->argv);
+ switch (status) {
+ case 0 :
+ (void) rou_alert(0,"dig_hashresp is working ok");
+ break;
+ default :
+ (void) rou_alert(0,"dig_hashresp is NOT working fine");
+ break;
+ }
break;
case 4 : //main task completed
(void) prc_cleantitle();