Finish challenge 25 and update License
This commit is contained in:
@@ -39,3 +39,9 @@ pub fn read_hex_lines(path: &str) -> Vec<Bytes> {
|
||||
.map(|line| Bytes::from_hex(&line.unwrap()))
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn xor(a: &[u8], b: &[u8]) -> Vec<u8> {
|
||||
Iterator::zip(a.iter(), b.iter())
|
||||
.map(|z| *(z.0) ^ *(z.1))
|
||||
.collect()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user