Add function prototypes.
[bertos.git] / algos / md2.h
1 /**
2  * \file
3  * <!--
4  * Copyright 2007 Develer S.r.l. (http://www.develer.com/)
5  * This file is part of DevLib - See README.devlib for information.
6  * -->
7  *
8  * \brief MD2 Message-Digest algorithm.
9  *
10  * The algorithm takes as input a message of arbitrary length and produces
11  * as output a 128-bit message digest of the input.
12  * It is conjectured that it is computationally infeasible to produce
13  * two messages having the same message digest, or to produce any
14  * message having a given prespecified target message digest.
15  *
16  *
17  *
18  * \version $Id$
19  * \author Daniele Basile <asterix@develer.com>
20  */
21
22 /*#*
23  *#* $Log$
24  *#* Revision 1.2  2007/01/30 17:31:44  asterix
25  *#* Add function prototypes.
26  *#*
27  *#* Revision 1.1  2007/01/30 15:53:26  batt
28  *#* Add first md2 skel.
29  *#*
30  *#*/
31
32 #ifndef ALGOS_MD2_H
33 #define ALGOS_MD2_H
34
35 #include <cfg/compiler.h>
36 #include <appconfig.h>
37
38 /**
39  * Context for MD2 computation.
40  */
41 typedef struct Md2Context
42 {
43         uint8_t buffer[CONFIG_MD2_BLOBK_LEN];   ///< Input buffer.
44         uint8_t state[CONFIG_MD2_BLOBK_LEN];    ///< Current state buffer.
45         uint8_t checksum[CONFIG_MD2_BLOBK_LEN]; ///< Checksum.
46         size_t counter;                         ///< Counter of remaining bytes.
47 } Md2Context;
48
49 void md2_init(Md2Context *context);
50 void md2_update(Md2Context *context, void *block_in, size_t block_len);
51 void md2_end(Md2Context *context, void *msg_digest);
52
53 #endif /* ALGOS_MD2_H */