"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mpi/mpicoder.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).

mpicoder.c  (libgcrypt-1.9.1.tar.bz2):mpicoder.c  (libgcrypt-1.9.2.tar.bz2)
skipping to change at line 352 skipping to change at line 352
return; return;
} }
nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB; nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB;
RESIZE_IF_NEEDED(a, nlimbs); RESIZE_IF_NEEDED(a, nlimbs);
a->sign = sign; a->sign = sign;
for (i=0, p = buffer+nbytes-1; p >= buffer+BYTES_PER_MPI_LIMB; ) for (i=0, p = buffer+nbytes-1; p >= buffer+BYTES_PER_MPI_LIMB; )
{ {
#if BYTES_PER_MPI_LIMB == 4 #if BYTES_PER_MPI_LIMB == 4
alimb = *p-- ; alimb = (mpi_limb_t)*p-- ;
alimb |= *p-- << 8 ; alimb |= (mpi_limb_t)*p-- << 8 ;
alimb |= *p-- << 16 ; alimb |= (mpi_limb_t)*p-- << 16 ;
alimb |= *p-- << 24 ; alimb |= (mpi_limb_t)*p-- << 24 ;
#elif BYTES_PER_MPI_LIMB == 8 #elif BYTES_PER_MPI_LIMB == 8
alimb = (mpi_limb_t)*p-- ; alimb = (mpi_limb_t)*p-- ;
alimb |= (mpi_limb_t)*p-- << 8 ; alimb |= (mpi_limb_t)*p-- << 8 ;
alimb |= (mpi_limb_t)*p-- << 16 ; alimb |= (mpi_limb_t)*p-- << 16 ;
alimb |= (mpi_limb_t)*p-- << 24 ; alimb |= (mpi_limb_t)*p-- << 24 ;
alimb |= (mpi_limb_t)*p-- << 32 ; alimb |= (mpi_limb_t)*p-- << 32 ;
alimb |= (mpi_limb_t)*p-- << 40 ; alimb |= (mpi_limb_t)*p-- << 40 ;
alimb |= (mpi_limb_t)*p-- << 48 ; alimb |= (mpi_limb_t)*p-- << 48 ;
alimb |= (mpi_limb_t)*p-- << 56 ; alimb |= (mpi_limb_t)*p-- << 56 ;
#else #else
# error please implement for this limb size. # error please implement for this limb size.
#endif #endif
a->d[i++] = alimb; a->d[i++] = alimb;
} }
if ( p >= buffer ) if ( p >= buffer )
{ {
#if BYTES_PER_MPI_LIMB == 4 #if BYTES_PER_MPI_LIMB == 4
alimb = *p--; alimb = (mpi_limb_t)*p--;
if (p >= buffer) if (p >= buffer)
alimb |= *p-- << 8; alimb |= (mpi_limb_t)*p-- << 8;
if (p >= buffer) if (p >= buffer)
alimb |= *p-- << 16; alimb |= (mpi_limb_t)*p-- << 16;
if (p >= buffer) if (p >= buffer)
alimb |= *p-- << 24; alimb |= (mpi_limb_t)*p-- << 24;
#elif BYTES_PER_MPI_LIMB == 8 #elif BYTES_PER_MPI_LIMB == 8
alimb = (mpi_limb_t)*p--; alimb = (mpi_limb_t)*p--;
if (p >= buffer) if (p >= buffer)
alimb |= (mpi_limb_t)*p-- << 8; alimb |= (mpi_limb_t)*p-- << 8;
if (p >= buffer) if (p >= buffer)
alimb |= (mpi_limb_t)*p-- << 16; alimb |= (mpi_limb_t)*p-- << 16;
if (p >= buffer) if (p >= buffer)
alimb |= (mpi_limb_t)*p-- << 24; alimb |= (mpi_limb_t)*p-- << 24;
if (p >= buffer) if (p >= buffer)
alimb |= (mpi_limb_t)*p-- << 32; alimb |= (mpi_limb_t)*p-- << 32;
 End of changes. 5 change blocks. 
8 lines changed or deleted 8 lines changed or added

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