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

Method xor

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

is_noneMethod · 0.80
ct_selectMethod · 0.45

Tested by

no test coverage detected