src/excrypt_bn.c
void ExCryptBnQw_SwapDwQw(const uint64_t* source, uint64_t* dest, uint32_t num_qwords)
{
  const uint32_t* source_dw = (const uint32_t*)source;
  uint32_t* dest_dw = (uint32_t*)dest;
  for (uint32_t i = 0; i < num_qwords; i++)
  {
    uint32_t first = source_dw[0];
    uint32_t second = source_dw[1];
    dest_dw[0] = second;
    dest_dw[1] = first;
    source_dw += 2;
    dest_dw += 2;
  }
}
// Swaps around the two DWORDs inside a QWORD
Swaps around the two DWORDs inside a QWORD
Swaps around the two DWORDs inside a QWORD
void ExCryptBnQw_SwapDwQw(const uint64_t* source, uint64_t* dest, uint32_t num_qwords)
{
  const uint32_t* source_dw = (const uint32_t*)source;
  uint32_t* dest_dw = (uint32_t*)dest;
  for (uint32_t i = 0; i < num_qwords; i++)
  {
    uint32_t first = source_dw[0];
    uint32_t second = source_dw[1];
    dest_dw[0] = second;
    dest_dw[1] = first;
    source_dw += 2;
    dest_dw += 2;
  }
}
void ExCryptBnQw_SwapDwQw ( const uint64_t * source , uint64_t * dest , uint32_t num_qwords ) { const uint32_t * source_dw = ( const uint32_t * ) source ; uint32_t * dest_dw = ( uint32_t * ) dest ; for ( uint32_t i = 0 ; i < num_qwords ; i ++ ) { uint32_t first = source_dw [ 0 ] ; uint32_t second = source_dw [ 1 ] ; dest_dw [ 0 ] = second ; dest_dw [ 1 ] = first ; source_dw += 2 ; dest_dw += 2 ; } }
Swaps around the two DWORDs inside a QWORD
Swaps around the two DWORDs inside a QWORD