miniproto.crypto.native.xor_bytes
miniproto.crypto.native.xor_bytes
Section titled “miniproto.crypto.native.xor_bytes”xor_bytes(left: bytes, right: bytes) -> bytesReturn the byte-wise XOR of equal-length inputs.
Parameters:
Returns:
bytes– A byte string of that shared length.
Raises:
ValueError– If the input lengths differ.
The public wrapper uses the fallback big-integer implementation because it wins the benchmarked handshake-sized cases; it offers no secret-zeroization.