~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to src/gen-md5.c

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2005-06-26 16:46:25 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050626164625-jjcde8hyztx7xq7o
Tags: 1.10-2
* wget-fix_error--save-headers patch from upstream
  (closes: Bug#314728)
* don't pattern-match server redirects patch from upstream
  (closes: Bug#163243)
* correct de.po typos
  (closes: Bug#313883)
* wget-E_html_behind_file_counting fix problem with adding the
  numbers after the html extension
* updated Standards-Version: to 3.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
  MD5_Final (result, ctx_imp);
117
117
#endif
118
118
}
 
119
 
 
120
#if 0
 
121
/* A debugging function for checking whether an MD5 library works. */
 
122
 
 
123
#include "gen-md5.h"
 
124
 
 
125
char *
 
126
debug_test_md5 (char *buf)
 
127
{
 
128
  unsigned char raw[16];
 
129
  static char res[33];
 
130
  unsigned char *p1;
 
131
  char *p2;
 
132
  int cnt;
 
133
  ALLOCA_MD5_CONTEXT (ctx);
 
134
 
 
135
  gen_md5_init (ctx);
 
136
  gen_md5_update ((unsigned char *)buf, strlen (buf), ctx);
 
137
  gen_md5_finish (ctx, raw);
 
138
 
 
139
  p1 = raw;
 
140
  p2 = res;
 
141
  cnt = 16;
 
142
  while (cnt--)
 
143
    {
 
144
      *p2++ = XNUM_TO_digit (*p1 >> 4);
 
145
      *p2++ = XNUM_TO_digit (*p1 & 0xf);
 
146
      ++p1;
 
147
    }
 
148
  *p2 = '\0';
 
149
 
 
150
  return res;
 
151
}
 
152
#endif