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

Function ct_eq

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

Source from the content-addressed store, hash-verified

631
632 #[test]
633 fn ct_eq() {
634 let a = Choice::TRUE;
635 let b = Choice::TRUE;
636 let c = Choice::FALSE;
637
638 assert!(a.ct_eq(&b).to_bool());
639 assert!(!a.ct_eq(&c).to_bool());
640 assert!(!b.ct_eq(&c).to_bool());
641
642 assert!(!a.ct_ne(&b).to_bool());
643 assert!(a.ct_ne(&c).to_bool());
644 assert!(b.ct_ne(&c).to_bool());
645 }
646
647 #[test]
648 fn ct_select() {

Callers 1

ct_eqMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected