fn hash(lengths: &[usize], rounds: usize) -> [u8; 256]
Performs the knot hash algorithm using a fixed-size array for better performance.