From: Jean-Marc Pigeon (Delson) Date: Tue, 8 Jul 2025 10:57:30 +0000 (-0400) Subject: tools chkhex seems to be working fine X-Git-Tag: tag-0.13~25 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=76a25b57afbfad619bfe1482f0d90eba74cb4923;p=jmp%2Fmailleur tools chkhex seems to be working fine --- diff --git a/lib/unidig.c b/lib/unidig.c index c812dbb..c327a5e 100644 --- a/lib/unidig.c +++ b/lib/unidig.c @@ -310,6 +310,45 @@ return hashmd5; */ /********************************************************/ /* */ +/* Procedure to convert an MD5TYP array in */ +/* hexadecimal structure to be a pure/plain MD5TYP */ +/* array. */ +/* Return (MD5TYP *)0 if trouble. */ +/* */ +/********************************************************/ +PUBLIC MD5TYP *dig_get_plain_md5(char *hexa) + +{ +MD5TYP *plain; + +plain=(MD5TYP *)0; +if (strlen(hexa)==sizeof(MD5TYP)*2) { + _Bool ok; + MD5TYP travail; + char tmp[3]; + + ok=true; + (void) memset(travail,'\000',sizeof(travail)); + (void) memset(tmp,'\000',sizeof(tmp)); + for (register int i=0;i +#include +#include +#include +#include +#include + +#include "subcnv.h" +#include "unidig.h" + +/* + +*/ +/********************************************************/ +/* */ +/* Main routine */ +/* Read the the hexadecimal number */ +/* convert it to binary and convert-it back*/ +/* to hexadecimal and compare it. */ +/* */ +/********************************************************/ +int main(int argc,char *argv[]) + +{ +int status; + +status=0; +for (int i=1;i\n",argv[i]); + } +return status; +}