MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _xor

Function _xor

pymongo/auth_shared.py:227–229  ·  view source on GitHub ↗

XOR two byte strings together.

(fir: bytes, sec: bytes)

Source from the content-addressed store, hash-verified

225
226
227def _xor(fir: bytes, sec: bytes) -> bytes:
228 """XOR two byte strings together."""
229 return b"".join([bytes([x ^ y]) for x, y in zip(fir, sec)])
230
231
232def _parse_scram_response(response: bytes) -> Dict[bytes, bytes]:

Callers 2

_authenticate_scramFunction · 0.90
_authenticate_scramFunction · 0.90

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected