Bonjour,

J'étudie l'algorithme de hashage MD2. On en trouve la définition officielle sur le site de

l'IETF dans le RFC 1319: http://www.ietf.org/rfc/rfc1319.txt

Il y a, sur cette page, un exemple d'implémentation en C.

Je vais énoncer ma question de façon claire et naïve: c'est quoi ce bidule "PROTO_LIST"???

Je met ci-dessous quelques extraits de code. Sinon, vous pouvez aller voir sur la page du RFC et faire simplement une recherche sur "PROTO_LIST"

Voici un extrait du fichier MD2.h :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
void MD2Init PROTO_LIST ((MD2_CTX *));
void MD2Update PROTO_LIST
  ((MD2_CTX *, unsigned char *, unsigned int));
void MD2Final PROTO_LIST ((unsigned char [16], MD2_CTX *));

Un extrait de MDDRIVER.c :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
static void MDString PROTO_LIST ((char *));
static void MDTimeTrial PROTO_LIST ((void));
static void MDTestSuite PROTO_LIST ((void));
static void MDFile PROTO_LIST ((char *));
static void MDFilter PROTO_LIST ((void));
static void MDPrint PROTO_LIST ((unsigned char [16]));
Et pour info, voici le fichier GLOBAL.h :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
/* GLOBAL.H - RSAREF types and constants
 */
 
/* PROTOTYPES should be set to one if and only if the compiler supports
     function argument prototyping.
   The following makes PROTOTYPES default to 0 if it has not already
     been defined with C compiler flags.
 */
 
#ifndef PROTOTYPES
#define PROTOTYPES 0
#endif
 
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
 
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
 
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
 
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
   If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
     returns an empty list.
 */
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif
Un tout grand merci d'avance à qui peut m'aider!!!