enigma/rotor/
encode.rs

1impl super::Rotor {
2    pub fn encode(&self, input: usize) -> usize {
3        self.wiring[(input + self.position) % 26]
4    }
5}