Decrypt an encrypted columnar segment blob (starting at byte 0 = `SEGC`). Returns the inner plaintext segment bytes (starting with `NDBS`).
(
key: &WalEncryptionKey,
blob: &[u8],
)
| 33 | /// |
| 34 | /// Returns the inner plaintext segment bytes (starting with `NDBS`). |
| 35 | pub(crate) fn decrypt_segment( |
| 36 | key: &WalEncryptionKey, |
| 37 | blob: &[u8], |
| 38 | ) -> Result<Vec<u8>, ColumnarError> { |
| 39 | decrypt_segment_envelope(key, &SEGC_MAGIC, blob) |
| 40 | .map_err(|e| ColumnarError::DecryptionFailed(e.to_string())) |
| 41 | } |
no test coverage detected