/// Enciphers the `plain_text` with `priming_key` using the Vigenere autokey system 
Enciphers the `plain_text` with `priming_key` using the Vigenere autokey system
Enciphers the ` plain_text ` with ` priming_key ` using the Vigenere autokey system
pub fn encipher(priming_key: &[u8], plain_text: &[u8]) -> Result<String, Error> {
    let mut key = common::sanitize_text(priming_key)?;
    let plain_text = common::sanitize_text(plain_text)?;
    if key.len() == 0 {
        return Ok(common::format_output(plain_text));
    }
    key.append(&mut plain_text.clone());
    key.truncate(plain_text.len());
    let enciphered = vigenere_standard::add_bytes(&plain_text, &key);
    Ok(common::format_output(enciphered))
}
pub fn encipher ( priming_key : & [ u8 ] , plain_text : & [ u8 ] ) -> Result < String , Error > { let mut key = common :: sanitize_text ( priming_key ) ? ; let plain_text = common :: sanitize_text ( plain_text ) ? ; if key . len ( ) == 0 { return Ok ( common :: format_output ( plain_text ) ) ; } key . append ( & mut plain_text . clone ( ) ) ; key . truncate ( plain_text . len ( ) ) ; let enciphered = vigenere_standard :: add_bytes ( & plain_text , & key ) ; Ok ( common :: format_output ( enciphered ) ) }
Enciphers the `plain_text` with `priming_key` using the Vigenere autokey system
Enciphers the ` plain_text ` with ` priming_key ` using the Vigenere autokey system
priming_key
&[u8]
plain_text
&[u8]