~ubuntu-branches/ubuntu/trusty/grub2/trusty

« back to all changes in this revision

Viewing changes to grub-core/lib/libgcrypt/cipher/md5.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *
21
21
 * According to the definition of MD5 in RFC 1321 from April 1992.
22
22
 * NOTE: This is *not* the same file as the one from glibc.
23
 
 * Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. 
24
 
 * heavily modified for GnuPG by Werner Koch <wk@gnupg.org> 
 
23
 * Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
24
 * heavily modified for GnuPG by Werner Koch <wk@gnupg.org>
25
25
 */
26
26
 
27
27
/* Test values:
37
37
#include <string.h>
38
38
 
39
39
#include "g10lib.h"
40
 
#include "memory.h"
41
40
#include "cipher.h"
42
41
 
43
42
#include "bithelp.h"
88
87
  register u32 C = ctx->C;
89
88
  register u32 D = ctx->D;
90
89
  u32 *cwp = correct_words;
91
 
    
 
90
 
92
91
#ifdef WORDS_BIGENDIAN
93
 
  { 
 
92
  {
94
93
    int i;
95
94
    byte *p2;
96
95
    const byte *p1;
222
221
{
223
222
  const unsigned char *inbuf = inbuf_arg;
224
223
  MD5_CONTEXT *hd = context;
225
 
  
 
224
 
226
225
  if( hd->count == 64 )  /* flush the buffer */
227
226
    {
228
227
      transform( hd, hd->buf );
243
242
    }
244
243
  _gcry_burn_stack (80+6*sizeof(void*));
245
244
 
246
 
  while( inlen >= 64 ) 
 
245
  while( inlen >= 64 )
247
246
    {
248
247
      transform( hd, inbuf );
249
248
      hd->count = 0;
270
269
  MD5_CONTEXT *hd = context;
271
270
  u32 t, msb, lsb;
272
271
  byte *p;
273
 
  
 
272
 
274
273
  md5_write(hd, NULL, 0); /* flush */;
275
274
 
276
275
  t = hd->nblocks;