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

Method key

atomic-cli/tests/it/git_projection_cb8a_test.rs:151–160  ·  view source on GitHub ↗

A deterministic hex-encoded Ed25519 test key file outside the worktree (RFC §12.5: untracked files break complete equivalence).

(&self)

Source from the content-addressed store, hash-verified

149 /// A deterministic hex-encoded Ed25519 test key file outside the
150 /// worktree (RFC §12.5: untracked files break complete equivalence).
151 fn key(&self) -> std::path::PathBuf {
152 let mut secret = [0u8; 32];
153 for (index, byte) in secret.iter_mut().enumerate() {
154 *byte = 0x8Au8.wrapping_add((index as u8).wrapping_mul(7).wrapping_add(3));
155 }
156 let hex: String = secret.iter().map(|byte| format!("{byte:02x}")).collect();
157 let path = self.home.path().join("cb8a-key.hex");
158 fs::write(&path, hex).expect("write key file");
159 path
160 }
161
162 /// Anchor the shim (CB-7A) so git-side transitions adopt through the
163 /// post-checkout hook (needed for ephemeral-view adoption tests).

Callers 1

anchorMethod · 0.45

Calls 5

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

Tested by

no test coverage detected