~ubuntu-branches/ubuntu/quantal/gnutls26/quantal

« back to all changes in this revision

Viewing changes to libextra/gl/md5.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Declaration of functions and data types used for MD5 sum computing
2
2
   library functions.
3
 
   Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006,2008
4
 
      Free Software Foundation, Inc.
 
3
   Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2010 Free Software
 
4
   Foundation, Inc.
5
5
   This file is part of the GNU C Library.
6
6
 
7
7
   This program is free software; you can redistribute it and/or modify it
29
29
 
30
30
#ifndef __GNUC_PREREQ
31
31
# if defined __GNUC__ && defined __GNUC_MINOR__
32
 
#  define __GNUC_PREREQ(maj, min)                                       \
 
32
#  define __GNUC_PREREQ(maj, min)                                       \
33
33
  ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
34
34
# else
35
35
#  define __GNUC_PREREQ(maj, min) 0
38
38
 
39
39
#ifndef __THROW
40
40
# if defined __cplusplus && __GNUC_PREREQ (2,8)
41
 
#  define __THROW       throw ()
 
41
#  define __THROW       throw ()
42
42
# else
43
43
#  define __THROW
44
44
# endif
54
54
# define __md5_stream md5_stream
55
55
#endif
56
56
 
 
57
# ifdef __cplusplus
 
58
extern "C" {
 
59
# endif
 
60
 
57
61
/* Structure to save state of computation between the single steps.  */
58
62
struct md5_ctx
59
63
{
81
85
   starting at BUFFER.
82
86
   It is necessary that LEN is a multiple of 64!!! */
83
87
extern void __md5_process_block (const void *buffer, size_t len,
84
 
                                 struct md5_ctx *ctx) __THROW;
 
88
                                 struct md5_ctx *ctx) __THROW;
85
89
 
86
90
/* Starting with the result of former calls of this function (or the
87
91
   initialization function update the context for the next LEN bytes
88
92
   starting at BUFFER.
89
93
   It is NOT required that LEN is a multiple of 64.  */
90
94
extern void __md5_process_bytes (const void *buffer, size_t len,
91
 
                                 struct md5_ctx *ctx) __THROW;
 
95
                                 struct md5_ctx *ctx) __THROW;
92
96
 
93
97
/* Process the remaining bytes in the buffer and put result from CTX
94
98
   in first 16 bytes following RESBUF.  The result is always in little
113
117
   output yields to the wanted ASCII representation of the message
114
118
   digest.  */
115
119
extern void *__md5_buffer (const char *buffer, size_t len,
116
 
                           void *resblock) __THROW;
 
120
                           void *resblock) __THROW;
 
121
 
 
122
# ifdef __cplusplus
 
123
}
 
124
# endif
117
125
 
118
126
#endif /* md5.h */