chsvlib
chsv helper source code

◆ memnot_copy()

void Chusov::Memory::memnot_copy ( void *restrict  pDest,
const void *restrict  pSrc,
std::size_t  cbSrc 
)
noexcept

Computes bitwise NOT of an arbitrary-precision integer and writes the result into a separate output buffer.

Parameters
[out]pDestA pointer to the destination buffer which receives the result of the computation. The capacity of the buffer must be at least cbSrc bytes. The buffer must not overlap with the input buffer pointed to by pSrc.
[in]pSrcA pointer to the input arbitrary-precision integer whose value is inverted using one's complement (bitwise NOT) operation and written to pDest. The byte size of the input integer is cbSrc. The buffer must not overlap with the output buffer.
cbSrcA byte size of the input buffer pSrc as well as a byte capacity of the output buffer pDest.

For the operation it is irrelevant whether bytes of the integers are specified in the Little-Endian or Big-Endian order.

The buffers pSrc and pDest must not overlap. To write the result into the same buffer as the operand, use memnot_inplace.

The memnot_LE and memnot_BE functions allow variable-sized and possibly overlapping buffers.

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