MCPcopy Create free account
hub / github.com/RustCrypto/utils / xor_in2out

Method xor_in2out

inout/src/inout.rs:189–198  ·  view source on GitHub ↗
(&mut self, data: &Array<u8, N>)

Source from the content-addressed store, hash-verified

187 /// If `data` length is not equal to the buffer length.
188 #[inline(always)]
189 pub fn xor_in2out(&mut self, data: &Array<u8, N>) {
190 unsafe {
191 let input = ptr::read(self.in_ptr);
192 let mut temp = Array::<u8, N>::default();
193 for i in 0..N::USIZE {
194 temp[i] = input[i] ^ data[i];
195 }
196 ptr::write(self.out_ptr, temp);
197 }
198 }
199}
200
201impl<N, M> InOut<'_, '_, Array<Array<u8, N>, M>>

Callers

nothing calls this directly

Calls 1

defaultFunction · 0.85

Tested by

no test coverage detected