vitaminc-protected 0.2.0-pre.1

Protected type wrappers for handling sensitive data. Part of the VitaminC cryptographic suite.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::ops::BitXor;
use zeroize::Zeroize;

use crate::{Controlled, Protected};

impl<T> BitXor for Protected<T>
where
    T: BitXor + Zeroize,
    <T as BitXor>::Output: Zeroize,
{
    type Output = Protected<T::Output>;

    fn bitxor(self, rhs: Self) -> Self::Output {
        self.zip(rhs, |x, y| x ^ y)
    }
}