use universal_hash::array::ArraySize;
#[allow(dead_code)]
pub(crate) trait HalftimeVariant: Copy + 'static {
const OUT: usize;
const DIM: usize;
const ENC: usize;
const TAG_BYTES: usize;
type TagSize: ArraySize;
}
pub(crate) mod hh16 {
pub(crate) const TAG_BYTES: usize = 16;
}
pub(crate) mod hh24 {
pub(crate) const TAG_BYTES: usize = 24;
}
pub(crate) mod hh32 {
pub(crate) const TAG_BYTES: usize = 32;
}
pub(crate) mod hh40 {
pub(crate) const TAG_BYTES: usize = 40;
}
#[derive(Copy, Clone, Debug)]
pub enum Hh16 {}
impl HalftimeVariant for Hh16 {
const OUT: usize = 2;
const DIM: usize = 6;
const ENC: usize = 7;
const TAG_BYTES: usize = 16;
type TagSize = universal_hash::consts::U16;
}
#[derive(Copy, Clone, Debug)]
pub enum Hh24 {}
impl HalftimeVariant for Hh24 {
const OUT: usize = 3;
const DIM: usize = 7;
const ENC: usize = 9;
const TAG_BYTES: usize = 24;
type TagSize = universal_hash::consts::U24;
}
#[derive(Copy, Clone, Debug)]
pub enum Hh32 {}
impl HalftimeVariant for Hh32 {
const OUT: usize = 4;
const DIM: usize = 7;
const ENC: usize = 10;
const TAG_BYTES: usize = 32;
type TagSize = universal_hash::consts::U32;
}
#[derive(Copy, Clone, Debug)]
pub enum Hh40 {}
impl HalftimeVariant for Hh40 {
const OUT: usize = 5;
const DIM: usize = 5;
const ENC: usize = 9;
const TAG_BYTES: usize = 40;
type TagSize = universal_hash::consts::U40;
}