Use application properties instead of ugly dual-use global variable
[gnumeric.git] / plugins / excel / md5.h
blob2b9ef75a5d57fe95a00bed9414aa378f78453c8b
1 /* Declaration of functions and data types used for MD5 sum computing
2 library functions.
3 Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006
4 Free Software Foundation, Inc.
5 This file is part of the GNU C Library.
7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
10 later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21 #ifndef _MD5_H
22 #define _MD5_H 1
24 #include <stdint.h>
25 #include <stddef.h>
27 #define MD5_DIGEST_SIZE 16
28 #define MD5_BLOCK_SIZE 64
30 /* Structure to save state of computation between the single steps. */
31 struct md5_ctx
33 uint32_t A;
34 uint32_t B;
35 uint32_t C;
36 uint32_t D;
38 uint32_t total[2];
39 uint32_t buflen;
40 uint32_t buffer[32];
43 /* Initialize structure containing state of computation.
44 (RFC 1321, 3.3: Step 3) */
45 extern void md5_init_ctx (struct md5_ctx *ctx);
47 /* Starting with the result of former calls of this function (or the
48 initialization function update the context for the next LEN bytes
49 starting at BUFFER.
50 It is necessary that LEN is a multiple of 64!!! */
51 extern void md5_process_block (const void *buffer, size_t len,
52 struct md5_ctx *ctx);
54 /* Put result from CTX in first 16 bytes following RESBUF. The result is
55 always in little endian byte order, so that a byte-wise output yields
56 to the wanted ASCII representation of the message digest. */
57 extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf);
60 #endif /* md5.h */