MCPcopy Create free account
hub / github.com/docknetwork/crypto / xor

Function xor

oblivious_transfer/src/util.rs:9–14  ·  view source on GitHub ↗
(a: &[u8], b: &[u8])

Source from the content-addressed store, hash-verified

7
8#[inline]
9pub fn xor(a: &[u8], b: &[u8]) -> Vec<u8> {
10 cfg_into_iter!(a)
11 .zip(cfg_into_iter!(b))
12 .map(|(a, b)| a ^ b)
13 .collect()
14}
15
16#[inline]
17pub fn and(a: &[u8], b: &[u8]) -> Vec<u8> {

Callers 15

test_xorFunction · 0.85
decrypt_Method · 0.85
decrypt_correlated_Method · 0.85
encrypt_randomMethod · 0.85
encrypt_Method · 0.85
encrypt_correlated_Method · 0.85
checkFunction · 0.85
newMethod · 0.85
transferMethod · 0.85
checkFunction · 0.85
encryptMethod · 0.85

Calls 1

mapMethod · 0.80

Tested by 1

test_xorFunction · 0.68