MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / read_ciphertext_blob

Method read_ciphertext_blob

nodedb/src/control/security/keystore/vault.rs:78–88  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

76 }
77
78 fn read_ciphertext_blob(&self) -> Result<String> {
79 check_key_file(&self.ciphertext_blob_path)?;
80 std::fs::read_to_string(&self.ciphertext_blob_path)
81 .map(|s| s.trim().to_owned())
82 .map_err(|e| crate::Error::Encryption {
83 detail: format!(
84 "failed to read Vault ciphertext blob from {}: {e}",
85 self.ciphertext_blob_path.display()
86 ),
87 })
88 }
89
90 fn write_ciphertext_blob(&self, ciphertext: &str) -> Result<()> {
91 std::fs::write(&self.ciphertext_blob_path, ciphertext).map_err(|e| {

Callers 2

unwrap_keyMethod · 0.45
rotateMethod · 0.45

Calls 1

check_key_fileFunction · 0.85

Tested by

no test coverage detected