Generic 8-bit Cipher Feedback (CFB8) mode implementation.
This crate implements CFB8 as a self-synchronizing stream cipher.
Warning
This crate does not provide any authentification! Thus ciphertext integrity is not verified, which can lead to serious vulnerabilities!
Examples
extern crate aes;
extern crate cfb8;
extern crate hex_literal;
use Aes128;
use Cfb8;
type AesCfb8 = ;
let key = b"very secret key.";
let iv = b"unique init vect";
let plaintext = b"The quick brown fox jumps over the lazy dog.";
let ciphertext = hex!;
let mut buffer = plaintext.to_vec;
// encrypt plaintext
new_var.unwrap.encrypt;
assert_eq!;
// and decrypt it back
new_var.unwrap.decrypt;
assert_eq!;
// CFB mode can be used with streaming messages
let mut cipher = new_var.unwrap;
for chunk in buffer.chunks_mut
assert_eq!;