Decrypt an encrypted columnar segment file blob (first bytes = `SEGT`).
(key: &WalEncryptionKey, blob: &[u8])
| 23 | |
| 24 | /// Decrypt an encrypted columnar segment file blob (first bytes = `SEGT`). |
| 25 | pub fn decrypt_file(key: &WalEncryptionKey, blob: &[u8]) -> Result<Vec<u8>, SegmentError> { |
| 26 | decrypt_segment_envelope(key, &SEGT_MAGIC, blob) |
| 27 | .map_err(|e| SegmentError::DecryptionFailed(e.to_string())) |
| 28 | } |
| 29 | |
| 30 | /// Sniff the first 4 bytes of a file to detect whether it is encrypted. |
| 31 | /// |
no test coverage detected