(root: &Path, name: &str, seed: u8)
| 51 | } |
| 52 | |
| 53 | fn write_key_file(root: &Path, name: &str, seed: u8) -> std::path::PathBuf { |
| 54 | let mut secret = [0u8; 32]; |
| 55 | for (index, byte) in secret.iter_mut().enumerate() { |
| 56 | *byte = seed.wrapping_add((index as u8) * 7 + 11); |
| 57 | } |
| 58 | let hex: String = secret.iter().map(|byte| format!("{byte:02x}")).collect(); |
| 59 | let path = root.join(name); |
| 60 | fs::write(&path, hex).expect("write key file"); |
| 61 | path |
| 62 | } |
| 63 | |
| 64 | /// A publisher: Git repo, imported shim baseline, three recorded changes. |
| 65 | fn setup_publisher(root: &Path, home: &Path) { |
no test coverage detected