1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
use super::keccakf_portable; use crate::platform::Caps; #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] #[non_exhaustive] pub enum Keccakf1600KernelId { Portable = 0, } impl Keccakf1600KernelId { #[inline] #[must_use] pub const fn as_str(self) -> &'static str { match self { Self::Portable => "portable", } } } #[must_use] pub fn permute_fn(id: Keccakf1600KernelId) -> fn(&mut [u64; 25]) { match id { Keccakf1600KernelId::Portable => keccakf_portable, } } /// All kernel IDs for agreement testing. #[cfg(test)] pub const ALL: &[Keccakf1600KernelId] = &[Keccakf1600KernelId::Portable]; #[inline] #[must_use] pub const fn required_caps(id: Keccakf1600KernelId) -> Caps { match id { Keccakf1600KernelId::Portable => Caps::NONE, } }