Struct sarkara::stream::HC256
[−]
[src]
pub struct HC256 { /* fields omitted */ }
HC256.
Example(process)
use rand::{ Rng, thread_rng }; use sarkara::stream::{ HC256, StreamCipher }; let mut rng = thread_rng(); let mut pass = vec![0; HC256::key_length()]; let mut nonce = vec![0; HC256::nonce_length()]; let mut data = vec![0; 1024]; rng.fill_bytes(&mut pass); rng.fill_bytes(&mut nonce); rng.fill_bytes(&mut data); let cipher = HC256::new(&pass); let ciphertext = cipher.process(&nonce, &data); let plaintext = cipher.process(&nonce, &ciphertext); assert_eq!(plaintext, data);
Trait Implementations
impl Debug for HC256
[src]
impl Clone for HC256
[src]
fn clone(&self) -> HC256
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more