src/excrypt_sha2.c
void sha512_compile(EXCRYPT_SHA512_STATE ctx[1])
{
  uint64_t    v[8], * p = ctx->wbuf;
  uint32_t    j;

  memcpy(v, ctx->hash, sizeof(ctx->hash));

  for (j = 0; j < 80; j += 16)
  {
    v_cycle(0, j); v_cycle(1, j);
    v_cycle(2, j); v_cycle(3, j);
    v_cycle(4, j); v_cycle(5, j);
    v_cycle(6, j); v_cycle(7, j);
    v_cycle(8, j); v_cycle(9, j);
    v_cycle(10, j); v_cycle(11, j);
    v_cycle(12, j); v_cycle(13, j);
    v_cycle(14, j); v_cycle(15, j);
  }

  ctx->hash[0] += v[0]; ctx->hash[1] += v[1];
  ctx->hash[2] += v[2]; ctx->hash[3] += v[3];
  ctx->hash[4] += v[4]; ctx->hash[5] += v[5];
  ctx->hash[6] += v[6]; ctx->hash[7] += v[7];
}
/* Compile 128 bytes of hash data into SHA384/512 digest    */
/* NOTE: this routine assumes that the byte order in the    */
/* ctx->wbuf[] at this point is such that low address bytes */
/* in the ORIGINAL byte stream will go into the high end of */
/* words on BOTH big and little endian systems              */
Compile 128 bytes of hash data into SHA384/512 digest
NOTE: this routine assumes that the byte order in the
ctx->wbuf[] at this point is such that low address bytes
in the ORIGINAL byte stream will go into the high end of
words on BOTH big and little endian systems
Compile 128 bytes of hash data into SHA384 / 512 digest NOTE : this routine assumes that the byte order in the ctx - > wbuf [] at this point is such that low address bytes in the ORIGINAL byte stream will go into the high end of words on BOTH big and little endian systems
void sha512_compile(EXCRYPT_SHA512_STATE ctx[1])
{
  uint64_t    v[8], * p = ctx->wbuf;
  uint32_t    j;
  memcpy(v, ctx->hash, sizeof(ctx->hash));
  for (j = 0; j < 80; j += 16)
  {
    v_cycle(0, j); v_cycle(1, j);
    v_cycle(2, j); v_cycle(3, j);
    v_cycle(4, j); v_cycle(5, j);
    v_cycle(6, j); v_cycle(7, j);
    v_cycle(8, j); v_cycle(9, j);
    v_cycle(10, j); v_cycle(11, j);
    v_cycle(12, j); v_cycle(13, j);
    v_cycle(14, j); v_cycle(15, j);
  }
  ctx->hash[0] += v[0]; ctx->hash[1] += v[1];
  ctx->hash[2] += v[2]; ctx->hash[3] += v[3];
  ctx->hash[4] += v[4]; ctx->hash[5] += v[5];
  ctx->hash[6] += v[6]; ctx->hash[7] += v[7];
}
void sha512_compile ( EXCRYPT_SHA512_STATE ctx [ 1 ] ) { uint64_t v [ 8 ] , * p = ctx -> wbuf ; uint32_t j ; memcpy ( v , ctx -> hash , sizeof ( ctx -> hash ) ) ; for ( j = 0 ; j < 80 ; j += 16 ) { v_cycle ( 0 , j ) ; v_cycle ( 1 , j ) ; v_cycle ( 2 , j ) ; v_cycle ( 3 , j ) ; v_cycle ( 4 , j ) ; v_cycle ( 5 , j ) ; v_cycle ( 6 , j ) ; v_cycle ( 7 , j ) ; v_cycle ( 8 , j ) ; v_cycle ( 9 , j ) ; v_cycle ( 10 , j ) ; v_cycle ( 11 , j ) ; v_cycle ( 12 , j ) ; v_cycle ( 13 , j ) ; v_cycle ( 14 , j ) ; v_cycle ( 15 , j ) ; } ctx -> hash [ 0 ] += v [ 0 ] ; ctx -> hash [ 1 ] += v [ 1 ] ; ctx -> hash [ 2 ] += v [ 2 ] ; ctx -> hash [ 3 ] += v [ 3 ] ; ctx -> hash [ 4 ] += v [ 4 ] ; ctx -> hash [ 5 ] += v [ 5 ] ; ctx -> hash [ 6 ] += v [ 6 ] ; ctx -> hash [ 7 ] += v [ 7 ] ; }
Compile 128 bytes of hash data into SHA384/512 digest
NOTE: this routine assumes that the byte order in the
ctx->wbuf[] at this point is such that low address bytes
in the ORIGINAL byte stream will go into the high end of
words on BOTH big and little endian systems
Compile 128 bytes of hash data into SHA384 / 512 digest NOTE : this routine assumes that the byte order in the ctx - > wbuf [] at this point is such that low address bytes in the ORIGINAL byte stream will go into the high end of words on BOTH big and little endian systems