"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sha1.c" between
mdadm-4.1.tar.gz and mdadm-4.2.tar.gz

About: mdadm is a tool for creating, managing and monitoring device arrays using the "md" driver in Linux, also known as Software RAID arrays.

sha1.c  (mdadm-4.1):sha1.c  (mdadm-4.2)
skipping to change at line 261 skipping to change at line 261
if (len > 0) if (len > 0)
{ {
size_t left_over = ctx->buflen; size_t left_over = ctx->buflen;
memcpy (&((char *) ctx->buffer)[left_over], buffer, len); memcpy (&((char *) ctx->buffer)[left_over], buffer, len);
left_over += len; left_over += len;
if (left_over >= 64) if (left_over >= 64)
{ {
sha1_process_block (ctx->buffer, 64, ctx); sha1_process_block (ctx->buffer, 64, ctx);
left_over -= 64; left_over -= 64;
memcpy (ctx->buffer, &ctx->buffer[16], left_over); memmove (ctx->buffer, &ctx->buffer[16], left_over);
} }
ctx->buflen = left_over; ctx->buflen = left_over;
} }
} }
/* --- Code below is the primary difference between md5.c and sha1.c --- */ /* --- Code below is the primary difference between md5.c and sha1.c --- */
/* SHA1 round constants */ /* SHA1 round constants */
#define K1 0x5a827999 #define K1 0x5a827999
#define K2 0x6ed9eba1 #define K2 0x6ed9eba1
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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