| 52 | /// This function is unsafe because it writes to a union type. |
| 53 | #[inline(always)] |
| 54 | pub unsafe fn fill_sponge<const N: usize>( |
| 55 | &mut self, |
| 56 | function_name: &SmallString, |
| 57 | nonce: u64, |
| 58 | function_params: &SmallString, |
| 59 | ) -> usize { |
| 60 | let mut offset = self.fill_sponge_single::<N>(0, function_name); |
| 61 | offset += write_decimal::<N>(&mut self.chars[offset..], nonce); |
| 62 | offset += self.fill_sponge_single::<N>(offset, function_params); |
| 63 | |
| 64 | self.chars[offset..135].fill(0); |
| 65 | self.chars[135] = 0x80; |
| 66 | offset |
| 67 | } |
| 68 | |
| 69 | /// # Safety |
| 70 | /// |