lfsr library

This commit is contained in:
2026-04-02 10:20:27 +02:00
parent 4e002c9677
commit ce53abf5aa
2 changed files with 133 additions and 1 deletions

View File

@@ -1,3 +1,12 @@
mod lfsr;
use lfsr::Lfsr;
fn main() {
println!("Hello, world!");
let mut lfsr = Lfsr::new(4, vec![0, 3], vec![0x12, 0x34, 0x56, 0x78]);
for _ in 0..16 {
let byte = lfsr.next();
println!("{:02x} | state: {:?}", byte, lfsr.state());
}
}