Crates.io | garble |
lib.rs | garble |
version | 0.0.1 |
source | src |
created_at | 2022-02-22 20:06:14.240241 |
updated_at | 2022-02-22 20:06:14.240241 |
description | Utilities to slightly modify data for fault injection |
homepage | |
repository | https://github.com/nmoutschen/garble |
max_upload_size | |
id | 537444 |
size | 6,837 |
The purpose of this crate is to provide a way to slightly modify data in controlled way for fault injection purposes.
use garble::{Garble, SimpleGarbler};
// Create a garbler with a 50% probability of garbling data
let mut garbler = SimpleGarbler::new(0.5);
// Garble some data
dbg!(true.garble(&mut garbler));
dbg!(128u64.garble(&mut garbler));
dbg!((3.5_f32).garble(&mut garbler));