ctSwapBytes
fn
void ctSwapBytes(uint doSwap, ubyte[] a, ubyte[] b) pure nothrow @nogc @safeSwaps two byte arrays conditionally in constant time.
Both arrays must have the same length. If doSwap is non-zero, the contents are swapped; otherwise, they remain unchanged.
Parameters
doSwap | Swap flag (0 = no swap, non-zero = swap). |
a | First array (may be modified). |
b | Second array (may be modified). |
Throws
Nothing (asserts on length mismatch in debug mode).