| 238 | /// Most padding implementations always return `Some`. |
| 239 | #[inline(always)] |
| 240 | pub fn get_tail_block(&mut self) -> Option<InOut<'_, '_, Array<u8, BS>>> { |
| 241 | // SAFETY: if `tail` is `Some`, then `out_ptr` points to a buffer with length equal |
| 242 | // to at least `blocks_len + 1` blocks, so it satisfies the safety conditions |
| 243 | // required by `InOut::from_raw`. |
| 244 | self.tail_block.as_ref().map(|in_block| unsafe { |
| 245 | let tail_out_ptr = self.out_ptr.add(self.blocks_len); |
| 246 | InOut::from_raw(in_block, tail_out_ptr) |
| 247 | }) |
| 248 | } |
| 249 | |
| 250 | /// Convert buffer into output slice. |
| 251 | #[inline(always)] |