"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cipher/sha512.c" between
libgcrypt-1.9.1.tar.bz2 and libgcrypt-1.9.2.tar.bz2

About: Libgcrypt is a general purpose library of cryptographic building blocks (originally based on GnuPG code).

sha512.c  (libgcrypt-1.9.1.tar.bz2):sha512.c  (libgcrypt-1.9.2.tar.bz2)
skipping to change at line 797 skipping to change at line 797
} }
#endif #endif
else else
{ {
if (hd->bctx.count < 112) if (hd->bctx.count < 112)
{ {
/* enough room */ /* enough room */
hd->bctx.buf[hd->bctx.count++] = 0x80; /* pad */ hd->bctx.buf[hd->bctx.count++] = 0x80; /* pad */
if (hd->bctx.count < 112) if (hd->bctx.count < 112)
memset (&hd->bctx.buf[hd->bctx.count], 0, 112 - hd->bctx.count); memset (&hd->bctx.buf[hd->bctx.count], 0, 112 - hd->bctx.count);
hd->bctx.count = 112;
} }
else else
{ {
/* need one extra block */ /* need one extra block */
hd->bctx.buf[hd->bctx.count++] = 0x80; /* pad character */ hd->bctx.buf[hd->bctx.count++] = 0x80; /* pad character */
if (hd->bctx.count < 128) if (hd->bctx.count < 128)
memset (&hd->bctx.buf[hd->bctx.count], 0, 128 - hd->bctx.count); memset (&hd->bctx.buf[hd->bctx.count], 0, 128 - hd->bctx.count);
hd->bctx.count = 128; hd->bctx.count = 128;
_gcry_md_block_write (context, NULL, 0); /* flush */ _gcry_md_block_write (context, NULL, 0); /* flush */
memset (hd->bctx.buf, 0, 112); /* fill next block with zeroes */ memset (hd->bctx.buf, 0, 112); /* fill next block with zeroes */
skipping to change at line 829 skipping to change at line 828
X (2); X (2);
X (3); X (3);
X (4); X (4);
X (5); X (5);
/* Note that these last two chunks are included even for SHA384. /* Note that these last two chunks are included even for SHA384.
We just ignore them. */ We just ignore them. */
X (6); X (6);
X (7); X (7);
#undef X #undef X
hd->bctx.count = 0;
_gcry_burn_stack (burn); _gcry_burn_stack (burn);
} }
static byte * static byte *
sha512_read (void *context) sha512_read (void *context)
{ {
SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context; SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
return hd->bctx.buf; return hd->bctx.buf;
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)