Skip to content

miniproto_native::crypto::xor_bytes

  • Crate: miniproto_native
  • Rust visibility: restricted
  • Source: rust/miniproto/src/crypto.rs
  • Python exposure: miniproto._native.xor_bytes (confirmed from adjacent PyO3 attributes)
fn xor_bytes(left: &[u8], right: &[u8]) -> _
  • left: First equal-length byte sequence.
  • right: Second equal-length byte sequence.
fn xor_bytes(left: &[u8], right: &[u8]) -> PyResult<Vec<u8>>

Defined in rust/miniproto/src/crypto.rs:249-251

Returns the bytewise exclusive-or of Python xor_bytes(left, right) inputs.

Returns ValueError unless both inputs have equal length.

  • left: First equal-length byte sequence.
  • right: Second equal-length byte sequence.