]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/lib/md5.h
Ignore UTF-8 marker at the start of .conf files.
[bacula/bacula] / bacula / src / lib / md5.h
1 /*
2  * Bacula MD5 definitions
3  *
4  *  Kern Sibbald, 2001
5  *
6  *   Version $Id$
7  */
8 /*
9    Copyright (C) 2001-2006 Kern Sibbald
10
11    This program is free software; you can redistribute it and/or
12    modify it under the terms of the GNU General Public License
13    version 2 as amended with additional clauses defined in the
14    file LICENSE in the main source directory.
15
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
19    the file LICENSE for additional details.
20
21  */
22
23 #ifndef __BMD5_H
24 #define __BMD5_H
25
26 #define MD5HashSize 16
27
28 struct MD5Context {
29    uint32_t buf[4];
30    uint32_t bits[2];
31    uint8_t  in[64];
32 };
33
34 typedef struct MD5Context MD5Context;
35
36 extern void MD5Init(struct MD5Context *ctx);
37 extern void MD5Update(struct MD5Context *ctx, unsigned char *buf, unsigned len);
38 extern void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
39 extern void MD5Transform(uint32_t buf[4], uint32_t in[16]);
40
41 #endif /* !__BMD5_H */