Fill the buffer by decoding up to 3 bytes of decoded Base64 input.
(&mut self, decoded_input: &[u8])
| 299 | |
| 300 | /// Fill the buffer by decoding up to 3 bytes of decoded Base64 input. |
| 301 | fn fill(&mut self, decoded_input: &[u8]) -> Result<(), Error> { |
| 302 | debug_assert!(self.is_empty()); |
| 303 | |
| 304 | if decoded_input.len() > Self::SIZE { |
| 305 | return Err(InvalidLength); |
| 306 | } |
| 307 | |
| 308 | self.position = 0; |
| 309 | self.length = decoded_input.len(); |
| 310 | self.decoded[..decoded_input.len()].copy_from_slice(decoded_input); |
| 311 | Ok(()) |
| 312 | } |
| 313 | |
| 314 | /// Take a specified number of bytes from the buffer. |
| 315 | /// |