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

Method xor

ctutils/src/ct_option.rs:478–486  ·  view source on GitHub ↗
(self, optb: CtOption<T>)

Source from the content-addressed store, hash-verified

476 #[inline]
477 #[must_use]
478 pub fn xor(self, optb: CtOption<T>) -> CtOption<T>
479 where
480 T: CtSelect,
481 {
482 CtOption {
483 value: self.value.ct_select(&optb.value, self.is_none()),
484 is_some: self.is_some ^ optb.is_some,
485 }
486 }
487
488 /// Zips `self` with another [`CtOption`].
489 ///

Callers

nothing calls this directly

Calls 2

is_noneMethod · 0.80
ct_selectMethod · 0.45

Tested by

no test coverage detected