Created
April 15, 2021 22:58
-
-
Save cpcloud/bf840af1310d6de79882b117d9fb324a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub fn munge<D, I>(&'a mut self, data: D) -> impl Iterator<Item = u8> + 'a | |
| where | |
| D: IntoIterator<Item = I> + 'a, | |
| I: Borrow<u8> + 'a, | |
| { | |
| data.into_iter() | |
| .zip(&mut self.key) | |
| .map(|(byte, k)| byte.borrow() ^ k) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment