~ubuntu-branches/ubuntu/maverick/bind9/maverick

« back to all changes in this revision

Viewing changes to lib/isc/md5.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 2000, 2001  Internet Software Consortium.
4
4
 *
5
 
 * Permission to use, copy, modify, and distribute this software for any
 
5
 * Permission to use, copy, modify, and/or distribute this software for any
6
6
 * purpose with or without fee is hereby granted, provided that the above
7
7
 * copyright notice and this permission notice appear in all copies.
8
8
 *
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: md5.c,v 1.9.206.1 2004/03/06 08:14:32 marka Exp $ */
 
18
/* $Id: md5.c,v 1.14 2007/06/19 23:47:17 tbox Exp $ */
19
19
 
20
 
/*
 
20
/*! \file
21
21
 * This code implements the MD5 message-digest algorithm.
22
22
 * The algorithm is due to Ron Rivest.  This code was
23
23
 * written by Colin Plumb in 1993, no copyright is claimed.
54
54
        } while (--words);
55
55
}
56
56
 
57
 
/*
 
57
/*!
58
58
 * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
59
59
 * initialization constants.
60
60
 */
74
74
        memset(ctx, 0, sizeof(isc_md5_t));
75
75
}
76
76
 
77
 
/* The four core functions - F1 is optimized somewhat */
 
77
/*@{*/
 
78
/*! The four core functions - F1 is optimized somewhat */
78
79
 
79
80
/* #define F1(x, y, z) (x & y | ~x & z) */
80
81
#define F1(x, y, z) (z ^ (x & (y ^ z)))
81
82
#define F2(x, y, z) F1(z, x, y)
82
83
#define F3(x, y, z) (x ^ y ^ z)
83
84
#define F4(x, y, z) (y ^ (x | ~z))
 
85
/*@}*/
84
86
 
85
 
/* This is the central step in the MD5 algorithm. */
 
87
/*! This is the central step in the MD5 algorithm. */
86
88
#define MD5STEP(f,w,x,y,z,in,s) \
87
89
         (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
88
90
 
89
 
/*
 
91
/*!
90
92
 * The core of the MD5 algorithm, this alters an existing MD5 hash to
91
93
 * reflect the addition of 16 longwords of new data.  MD5Update blocks
92
94
 * the data and converts bytes into longwords for this routine.
174
176
        buf[3] += d;
175
177
}
176
178
 
177
 
/*
 
179
/*!
178
180
 * Update context to reflect the concatenation of another buffer full
179
181
 * of bytes.
180
182
 */
213
215
        memcpy(ctx->in, buf, len);
214
216
}
215
217
 
216
 
/*
 
218
/*!
217
219
 * Final wrapup - pad to 64-byte boundary with the bit pattern
218
220
 * 1 0* (64-bit count of bits processed, MSB-first)
219
221
 */