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

Method ct_select_array

ctutils/src/traits/ct_select.rs:49–51  ·  view source on GitHub ↗
(a: &[Self; N], b: &[Self; N], choice: Choice)

Source from the content-addressed store, hash-verified

47 /// Select between `a` and `b` in constant-time based on `choice`.
48 #[must_use]
49 fn ct_select_array(a: &[Self; N], b: &[Self; N], choice: Choice) -> [Self; N] {
50 core::array::from_fn(|i| Self::ct_select(&a[i], &b[i], choice))
51 }
52}
53
54impl<T, const N: usize> CtSelect for [T; N]

Callers

nothing calls this directly

Implementers 1

ct_select.rsctutils/src/traits/ct_select.rs

Calls 1

ct_selectFunction · 0.50

Tested by

no test coverage detected