INNER CODE UNIT · Rust
clmul_xor_eq_soft32
ethereum/mpz · crates/clmul/src/lib.rs:105
fn clmul_xor_eq_soft32() {
use soft32::Clmul;
let mut one = [0u8; 16];
one[15] = 1;
let mut two = [0u8; 16];
two[15] = 2;
let mut three = [0u8; 16];
three[15] = 3;
let mut six = [0u8; 16];
six[15] = 6;
let a1 = Clmul::new(&one);
let a2 = Clmul::new(&two);
let a3 = Clmul::new(&three);
let a6 = Clmul::new(&six);
assert!(a1 ^ a2 == a3);