~ubuntu-branches/ubuntu/precise/sitecopy/precise

« back to all changes in this revision

Viewing changes to lib/neon/ne_md5.c

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi
  • Date: 2008-07-22 07:31:05 UTC
  • mfrom: (1.1.4 upstream) (4.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080722073105-cbqs1hnc2wvqejfd
Tags: 1:0.16.6-1
* New upstream release
  - fix a crash with progress bar enabled; Closes: #486378
* debian/control
  - set myself as maintainer, Kartik as uploader
  - set Vcs-{Browser,Git} fields
  - bump Standards-Version to 3.8.0
    + debian/README.source added
  - added DM-Upload-Allowed flag
* debian/patches/05_libneon27_transition.dpatch
  - removed since merged upstream
* debian/copyrightdebian/copyright
  - updated upstream email and copyright years
* debian/patches/10_bts410703_preserve_storage_files_sigint.dpatch
  - added to preserve storage files if SIGINT (Ctrl+C) is sent to sitecopy;
    thanks to Andreas Henriksson for the patch; Closes: #410703

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
   IMPORTANT: On some systems it is required that RESBUF is correctly
120
120
   aligned for a 32 bits value.  */
121
121
void *
122
 
md5_read_ctx (ctx, resbuf)
123
 
     const struct md5_ctx *ctx;
124
 
     void *resbuf;
 
122
md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
125
123
{
126
124
  ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
127
125
  ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
137
135
   IMPORTANT: On some systems it is required that RESBUF is correctly
138
136
   aligned for a 32 bits value.  */
139
137
void *
140
 
md5_finish_ctx (ctx, resbuf)
141
 
     struct md5_ctx *ctx;
142
 
     void *resbuf;
 
138
md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
143
139
{
144
140
  /* Take yet unprocessed bytes into account.  */
145
141
  md5_uint32 bytes = ctx->buflen;
168
164
   resulting message digest number will be written into the 16 bytes
169
165
   beginning at RESBLOCK.  */
170
166
int
171
 
md5_stream (stream, resblock)
172
 
     FILE *stream;
173
 
     void *resblock;
 
167
md5_stream (FILE *stream, void *resblock)
174
168
{
175
169
  /* Important: BLOCKSIZE must be a multiple of 64.  */
176
170
#define BLOCKSIZE 4096
221
215
}
222
216
 
223
217
void
224
 
md5_process_bytes (buffer, len, ctx)
225
 
     const void *buffer;
226
 
     size_t len;
227
 
     struct md5_ctx *ctx;
 
218
md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
228
219
{
229
220
  /* When we already have some bits in our internal buffer concatenate
230
221
     both inputs first.  */
279
270
   It is assumed that LEN % 64 == 0.  */
280
271
 
281
272
void
282
 
md5_process_block (buffer, len, ctx)
283
 
     const void *buffer;
284
 
     size_t len;
285
 
     struct md5_ctx *ctx;
 
273
md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
286
274
{
287
275
  md5_uint32 correct_words[16];
288
276
  const unsigned char *words = buffer;