Decrypt an encrypted checkpoint blob (starting at byte 0, which is `SEGV`).
(
key: &nodedb_wal::crypto::WalEncryptionKey,
blob: &[u8],
)
| 54 | |
| 55 | /// Decrypt an encrypted checkpoint blob (starting at byte 0, which is `SEGV`). |
| 56 | fn decrypt_checkpoint( |
| 57 | key: &nodedb_wal::crypto::WalEncryptionKey, |
| 58 | blob: &[u8], |
| 59 | ) -> Result<Vec<u8>, VectorError> { |
| 60 | nodedb_wal::crypto::decrypt_segment_envelope(key, &SEGV_MAGIC, blob).map_err(|e| { |
| 61 | VectorError::CheckpointEncryptionError { |
| 62 | detail: e.to_string(), |
| 63 | } |
| 64 | }) |
| 65 | } |
| 66 | |
| 67 | #[derive(Serialize, Deserialize, zerompk::ToMessagePack, zerompk::FromMessagePack)] |
| 68 | pub(crate) struct CollectionSnapshot { |
no test coverage detected