1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
use std::ops::Index;

/// Key used in HighwayHash that will drastically change the hash outputs.
#[derive(Debug, Default, Clone, Copy)]
#[repr(align(32))]
pub struct Key(pub [u64; 4]);

impl Index<usize> for Key {
    type Output = u64;
    fn index(&self, index: usize) -> &u64 {
        &self.0[index]
    }
}