processing_code 0.1.0

Simply encode and decode
Documentation
//! # **processing_code**
//! It's a simply crate I wrote for fun<br>  
//! It's used to encode and decode with the password which users give<br>
//! And it's just use XOR

/// get a password and content
/// then processing the content with the password
/// # Example
/// ```
/// let password = "Password";
/// let content = "Content";
///
/// let encode = processing_code(password, content);
/// println!("{}", encode);
///
/// let decode = processing_code(password, &encode);
/// assert_eq!(content, decode);
/// ```
pub fn processing_code(password: &str, content: &str) -> String {
    let password = password.as_bytes();
    let content: Vec<u8> = content
        .chars()
        .map(|x| {
            let mut new: u8 = 0;
            password.iter().for_each(|y| new = x as u8 ^ y);
            new
        })
        .collect();
    content.iter().map(|x| *x as char).collect::<String>()
}