~ubuntu-branches/ubuntu/precise/libpgm/precise

« back to all changes in this revision

Viewing changes to openpgm/pgm/include/impl/.svn/text-base/md5.h.svn-base

  • Committer: Bazaar Package Importer
  • Author(s): Gabriel de Perthuis
  • Date: 2011-04-07 16:48:52 UTC
  • Revision ID: james.westby@ubuntu.com-20110407164852-8uamem42ojeptj6l
Tags: upstream-5.1.116~dfsg
ImportĀ upstreamĀ versionĀ 5.1.116~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vim:ts=8:sts=8:sw=4:noai:noexpandtab
 
2
 *
 
3
 * MD5 hashing algorithm.
 
4
 *
 
5
 * MD5 original source GNU C Library:
 
6
 * Includes functions to compute MD5 message digest of files or memory blocks
 
7
 * according to the definition of MD5 in RFC 1321 from April 1992.
 
8
 *
 
9
 * Copyright (C) 1995, 1996, 2001, 2003 Free Software Foundation, Inc.
 
10
 *
 
11
 * This file is free software; you can redistribute it and/or
 
12
 * modify it under the terms of the GNU Lesser General Public
 
13
 * License as published by the Free Software Foundation; either
 
14
 * version 2 of the License, or (at your option) any later version.
 
15
 *
 
16
 * This file 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 GNU
 
19
 * General General Public License for more details.
 
20
 *
 
21
 * You should have received a copy of the GNU Lesser General Public
 
22
 * License along with this file; if not, write to the Free Software
 
23
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
24
 */
 
25
 
 
26
#if !defined (__PGM_IMPL_FRAMEWORK_H_INSIDE__) && !defined (PGM_COMPILATION)
 
27
#       error "Only <framework.h> can be included directly."
 
28
#endif
 
29
 
 
30
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
 
31
#       pragma once
 
32
#endif
 
33
#ifndef __PGM_IMPL_MD5_H__
 
34
#define __PGM_IMPL_MD5_H__
 
35
 
 
36
struct pgm_md5_t;
 
37
 
 
38
#include <pgm/types.h>
 
39
 
 
40
PGM_BEGIN_DECLS
 
41
 
 
42
struct pgm_md5_t
 
43
{
 
44
        uint32_t        A;
 
45
        uint32_t        B;
 
46
        uint32_t        C;
 
47
        uint32_t        D;
 
48
 
 
49
        uint32_t        total[2];
 
50
        uint32_t        buflen;
 
51
        char            buffer[128]
 
52
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
 
53
                                        __attribute__ ((__aligned__ (__alignof__ (uint32_t))))
 
54
#endif
 
55
                                        ;
 
56
};
 
57
 
 
58
PGM_GNUC_INTERNAL void pgm_md5_init_ctx (struct pgm_md5_t*);
 
59
PGM_GNUC_INTERNAL void pgm_md5_process_bytes (struct pgm_md5_t*restrict, const void*restrict, size_t);
 
60
PGM_GNUC_INTERNAL void* pgm_md5_finish_ctx (struct pgm_md5_t*restrict, void*restrict);
 
61
 
 
62
PGM_END_DECLS
 
63
 
 
64
#endif /* __PGM_IMPL_MD5_H__ */