MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / key_file

Function key_file

atomic-cli/tests/it/git_cutover_cb13b_test.rs:70–79  ·  view source on GitHub ↗
(home: &Path)

Source from the content-addressed store, hash-verified

68}
69
70fn key_file(home: &Path) -> std::path::PathBuf {
71 let mut secret = [0u8; 32];
72 for (index, byte) in secret.iter_mut().enumerate() {
73 *byte = 0x42u8.wrapping_add((index as u8).wrapping_mul(11).wrapping_add(5));
74 }
75 let hex: String = secret.iter().map(|byte| format!("{byte:02x}")).collect();
76 let path = home.join("cb13b-key.hex");
77 fs::write(&path, hex).expect("write key file");
78 path
79}
80
81#[allow(dead_code)]
82fn git(root: &Path, args: &[&str]) {

Callers 1

newMethod · 0.70

Calls 4

iter_mutMethod · 0.80
writeFunction · 0.70
collectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected