chsvlib
chsv helper source code

◆ memxor_inplace()

void Chusov::Memory::memxor_inplace ( void *  pSrcDest,
const void *  pSrc2,
std::size_t  cbSrcDest 
)
noexcept

Computes bitwise OR of two arbitrary precision integers and places the result into a buffer of one of the operands.

Parameters
[in,out]pSrcDestA buffer, which on input contains the first integral operand. On output, the buffer receives the result of the operation.
[in]pSrc2A pointer to the second integral operand. The parameter is allowed to point to the same buffer as pSrcDest. Other than that, the buffers may not overlap. To use overlapping buffers use memxor_LE or memxor_BE.
cbSrcDestA byte size of both of the operands as well as the capacity of the output buffer.

For the operation the byte order of the operands is irrelevant.

To preserve the values of both operands and copy the result of the operation into a third buffer, use memxor_copy (faster), memxor_LE or memxor_BE.

The memxor_LE and memxor_BE functions allow variable-sized and possibly overlapping buffers.

See also
memxor_copy;
memxor_LE;
memxor_BE;
memand_LE, memand_BE;
memor_LE, memor_BE;
memandnot_LE, memandnot_BE;
memornot_LE, memornot_BE;
memxornot_LE, memxornot_BE;
memnot_LE, memnot_BE.