MCPcopy Create free account
hub / github.com/RustCrypto/utils / pad_with_zeros

Method pad_with_zeros

block-buffer/src/lib.rs:226–232  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

224 /// Pad remaining data with zeros and return resulting block.
225 #[inline(always)]
226 pub fn pad_with_zeros(&mut self) -> Array<u8, BS> {
227 let mut res = Array::<u8, BS>::default();
228 let data = self.get_data();
229 res[..data.len()].copy_from_slice(data);
230 self.reset();
231 res
232 }
233
234 /// Return current cursor position.
235 #[inline(always)]

Callers

nothing calls this directly

Calls 4

defaultFunction · 0.85
get_dataMethod · 0.80
lenMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected