vitaminc_protected/ops.rs
1use std::ops::BitXor;
2use zeroize::Zeroize;
3
4use crate::{Controlled, Protected};
5
6impl<T> BitXor for Protected<T>
7where
8 T: BitXor + Zeroize,
9 <T as BitXor>::Output: Zeroize,
10{
11 type Output = Protected<T::Output>;
12
13 fn bitxor(self, rhs: Self) -> Self::Output {
14 self.zip(rhs, |x, y| x ^ y)
15 }
16}