Encrypt `plaintext` (a complete plaintext segment buffer) and return the SEGC envelope.
(
key: &WalEncryptionKey,
plaintext: &[u8],
)
| 22 | /// Encrypt `plaintext` (a complete plaintext segment buffer) and return the |
| 23 | /// SEGC envelope. |
| 24 | pub(crate) fn encrypt_segment( |
| 25 | key: &WalEncryptionKey, |
| 26 | plaintext: &[u8], |
| 27 | ) -> Result<Vec<u8>, ColumnarError> { |
| 28 | encrypt_segment_envelope(key, &SEGC_MAGIC, plaintext) |
| 29 | .map_err(|e| ColumnarError::EncryptionFailed(e.to_string())) |
| 30 | } |
| 31 | |
| 32 | /// Decrypt an encrypted columnar segment blob (starting at byte 0 = `SEGC`). |
| 33 | /// |
no test coverage detected