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

Function ct_eq

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

Source from the content-addressed store, hash-verified

655
656 #[test]
657 fn ct_eq() {
658 let a = Choice::TRUE;
659 let b = Choice::TRUE;
660 let c = Choice::FALSE;
661
662 assert!(a.ct_eq(&b).to_bool());
663 assert!(!a.ct_eq(&c).to_bool());
664 assert!(!b.ct_eq(&c).to_bool());
665
666 assert!(!a.ct_ne(&b).to_bool());
667 assert!(a.ct_ne(&c).to_bool());
668 assert!(b.ct_ne(&c).to_bool());
669 }
670
671 #[test]
672 fn ct_select() {

Callers 1

ct_eqMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected