From: Jean-Marc Pigeon (Delson) Date: Sat, 5 Jul 2025 14:36:37 +0000 (-0400) Subject: Moved cnv_hashmd5 to cnv_cryptmd5 X-Git-Tag: tag-0.12~27 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=a44023b677fa861ff5ff387f8200aa662fbae57d;p=jmp%2Fmailleur Moved cnv_hashmd5 to cnv_cryptmd5 --- diff --git a/lib/lvleml.c b/lib/lvleml.c index c6b7066..4734cb0 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -436,7 +436,7 @@ while (proceed==true) { char *local; char *hexa; - local=cnv_hashmd5(passwd,(unsigned char *)challenge); + local=cnv_cryptmd5(passwd,(unsigned char *)challenge); hexa=cnv_tohexa(local); //(void) rou_alert(0,"%s anwr=<%s>",OPEP,answer); //(void) rou_alert(0,"%s hexa=<%s>",OPEP,hexa); @@ -623,9 +623,9 @@ while (proceed==true) { char *local; char *hexa; - //local=cnv_hashmd5(usr->passwd,(unsigned char *)seq); + //local=cnv_cryptmd5(usr->passwd,(unsigned char *)seq); (void) rou_asprintf(&decoded,"%s%s%s%s",IOBNULL,name,IOBNULL,(char *)0); - local=cnv_hashmd5("mailleur",(unsigned char *)seq); + local=cnv_cryptmd5("mailleur",(unsigned char *)seq); hexa=cnv_tohexa(local); (void) rou_alert(0,"%s code=<%s>",OPEP,code); (void) rou_alert(0,"%s hexa=<%s>",OPEP,hexa); diff --git a/lib/subcnv.c b/lib/subcnv.c index 07e3939..505edca 100644 --- a/lib/subcnv.c +++ b/lib/subcnv.c @@ -174,10 +174,11 @@ return coded; */ /********************************************************/ /* */ -/* procedure to compute a MD5 hashing. */ +/* Procedure to crypt a string with MD5 hash */ +/* function. */ /* */ /********************************************************/ -PUBLIC char *cnv_hashmd5(const void *key,unsigned char *seq) +PUBLIC char *cnv_cryptmd5(const void *key,unsigned char *seq) { #define OPEP "subcnv.c:cnv_hashmd5," diff --git a/lib/subcnv.h b/lib/subcnv.h index 50c1e5d..dfb54ff 100644 --- a/lib/subcnv.h +++ b/lib/subcnv.h @@ -19,8 +19,12 @@ extern char *cnv_getb64(char *b64); //to an ASCII B64 sequence extern char *cnv_setb64(const char *str); -//Procedure to calculate a MD5 hash function -extern char *cnv_hashmd5(const void *key,unsigned char *seq); +//procedure to convert a string to a 128 Bit sequence +//as a string +extern char *cnv_hashmd5(char *seq); + +//Procedure to crypt a string with MD5 hash function +extern char *cnv_cryptmd5(const void *key,unsigned char *seq); //Procedure to convert a string of character as an HEXA string extern char *cnv_tohexa(const char *str);