(&self, ciphertext: &str)
| 88 | } |
| 89 | |
| 90 | fn write_ciphertext_blob(&self, ciphertext: &str) -> Result<()> { |
| 91 | std::fs::write(&self.ciphertext_blob_path, ciphertext).map_err(|e| { |
| 92 | crate::Error::Encryption { |
| 93 | detail: format!( |
| 94 | "failed to write Vault ciphertext blob to {}: {e}", |
| 95 | self.ciphertext_blob_path.display() |
| 96 | ), |
| 97 | } |
| 98 | }) |
| 99 | } |
| 100 | |
| 101 | async fn decrypt_with_vault(&self, ciphertext: &str) -> Result<Zeroizing<[u8; 32]>> { |
| 102 | let token = self.read_token()?; |