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

Function ct_select

ctutils/src/choice.rs:672–677  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

670
671 #[test]
672 fn ct_select() {
673 let a = Choice::FALSE;
674 let b = Choice::TRUE;
675 assert_eq!(a.ct_select(&b, Choice::FALSE).to_bool(), a.to_bool());
676 assert_eq!(a.ct_select(&b, Choice::TRUE).to_bool(), b.to_bool());
677 }
678
679 #[test]
680 fn and() {

Callers 4

conditional_selectMethod · 0.70
ct_assignMethod · 0.50
ct_swapMethod · 0.50
ct_select_arrayMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected