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

Function key_file

atomic-cli/tests/it/git_shim_cb13d_test.rs:142–151  ·  view source on GitHub ↗
(home: &Path)

Source from the content-addressed store, hash-verified

140}
141
142fn key_file(home: &Path) -> PathBuf {
143 let mut secret = [0u8; 32];
144 for (index, byte) in secret.iter_mut().enumerate() {
145 *byte = 0x42u8.wrapping_add((index as u8).wrapping_mul(13).wrapping_add(7));
146 }
147 let hex: String = secret.iter().map(|byte| format!("{byte:02x}")).collect();
148 let path = home.join("cb13d-binding.key");
149 fs::write(&path, hex).expect("write binding key");
150 path
151}
152
153/// Opt the repository into the optional watch daemon (the shim opt-in
154/// itself is recorded by `git shim enable`). The serialized

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