~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/isc/sha1.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, 2003  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: sha1.c,v 1.10.2.2.2.3 2004/03/06 08:14:35 marka Exp $ */
 
18
/* $Id: sha1.c,v 1.18 2007/06/19 23:47:17 tbox Exp $ */
19
19
 
20
20
/*      $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */
21
21
/*      $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $       */
22
22
 
23
 
/*
 
23
/*! \file
24
24
 * SHA-1 in C
25
 
 * By Steve Reid <steve@edmweb.com>
 
25
 * \author By Steve Reid <steve@edmweb.com>
26
26
 * 100% Public Domain
27
 
 *
 
27
 * \verbatim
28
28
 * Test Vectors (from FIPS PUB 180-1)
29
29
 * "abc"
30
30
 *   A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
32
32
 *   84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
33
33
 * A million repetitions of "a"
34
34
 *   34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
 
35
 * \endverbatim
35
36
 */
36
37
 
37
38
#include "config.h"
44
45
 
45
46
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
46
47
 
47
 
/*
 
48
/*@{*/
 
49
/*!
48
50
 * blk0() and blk() perform the initial expand.
49
51
 * I got the idea of expanding during the round function from SSLeay
50
52
 */
61
63
                                ^ block->l[(i + 2) & 15] \
62
64
                                ^ block->l[i & 15], 1))
63
65
 
64
 
/*
 
66
/*@}*/
 
67
/*@{*/
 
68
/*!
65
69
 * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1
66
70
 */
67
71
#define R0(v,w,x,y,z,i) \
80
84
        z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \
81
85
        w = rol(w, 30);
82
86
 
 
87
/*@}*/
 
88
 
83
89
typedef union {
84
90
        unsigned char c[64];
85
91
        unsigned int l[16];
154
160
}
155
161
#endif
156
162
 
157
 
/*
 
163
/*!
158
164
 * Hash a single 512-bit block. This is the core of the algorithm.
159
165
 */
160
166
static void
217
223
}
218
224
 
219
225
 
220
 
/*
 
226
/*!
221
227
 * isc_sha1_init - Initialize new context
222
228
 */
223
229
void
240
246
        memset(context, 0, sizeof(isc_sha1_t));
241
247
}
242
248
 
243
 
/*
 
249
/*!
244
250
 * Run your data through this.
245
251
 */
246
252
void
270
276
}
271
277
 
272
278
 
273
 
/*
 
279
/*!
274
280
 * Add padding and return the message digest.
275
281
 */
276
282