1use universal_hash::array::ArraySize;
4
5#[allow(dead_code)]
7pub(crate) trait HalftimeVariant: Copy + 'static {
8 const OUT: usize;
10 const DIM: usize;
12 const ENC: usize;
14 const TAG_BYTES: usize;
16 type TagSize: ArraySize;
18}
19
20pub(crate) mod hh16 {
22 pub(crate) const TAG_BYTES: usize = 16;
23}
24
25pub(crate) mod hh24 {
27 pub(crate) const TAG_BYTES: usize = 24;
28}
29
30pub(crate) mod hh32 {
32 pub(crate) const TAG_BYTES: usize = 32;
33}
34
35pub(crate) mod hh40 {
37 pub(crate) const TAG_BYTES: usize = 40;
38}
39
40#[derive(Copy, Clone, Debug)]
42pub enum Hh16 {}
43
44impl HalftimeVariant for Hh16 {
45 const OUT: usize = 2;
46 const DIM: usize = 6;
47 const ENC: usize = 7;
48 const TAG_BYTES: usize = 16;
49 type TagSize = universal_hash::consts::U16;
50}
51
52#[derive(Copy, Clone, Debug)]
54pub enum Hh24 {}
55
56impl HalftimeVariant for Hh24 {
57 const OUT: usize = 3;
58 const DIM: usize = 7;
59 const ENC: usize = 9;
60 const TAG_BYTES: usize = 24;
61 type TagSize = universal_hash::consts::U24;
62}
63
64#[derive(Copy, Clone, Debug)]
66pub enum Hh32 {}
67
68impl HalftimeVariant for Hh32 {
69 const OUT: usize = 4;
70 const DIM: usize = 7;
71 const ENC: usize = 10;
72 const TAG_BYTES: usize = 32;
73 type TagSize = universal_hash::consts::U32;
74}
75
76#[derive(Copy, Clone, Debug)]
78pub enum Hh40 {}
79
80impl HalftimeVariant for Hh40 {
81 const OUT: usize = 5;
82 const DIM: usize = 5;
83 const ENC: usize = 9;
84 const TAG_BYTES: usize = 40;
85 type TagSize = universal_hash::consts::U40;
86}