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

Method set_data_unchecked

block-buffer/src/lib.rs:304–310  ·  view source on GitHub ↗
(&mut self, buf: &[u8])

Source from the content-addressed store, hash-verified

302 /// to block size.
303 #[inline(always)]
304 unsafe fn set_data_unchecked(&mut self, buf: &[u8]) {
305 unsafe {
306 self.set_pos_unchecked(buf.len());
307 let dst_ptr: *mut u8 = self.buffer.as_mut_ptr().cast();
308 ptr::copy_nonoverlapping(buf.as_ptr(), dst_ptr, buf.len());
309 }
310 }
311}
312
313/// Size of serialized `BlockBuffer` in bytes.

Callers 3

try_newMethod · 0.80
digest_blocksMethod · 0.80
deserializeMethod · 0.80

Calls 2

lenMethod · 0.80
set_pos_uncheckedMethod · 0.45

Tested by

no test coverage detected