MCPcopy Create free account
hub / github.com/RustCrypto/formats / fill

Method fill

base64ct/src/decoder.rs:301–312  ·  view source on GitHub ↗

Fill the buffer by decoding up to 3 bytes of decoded Base64 input.

(&mut self, decoded_input: &[u8])

Source from the content-addressed store, hash-verified

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 ///

Callers 1

fill_block_bufferMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected