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

Method get_pos

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

Source from the content-addressed store, hash-verified

234 /// Return current cursor position.
235 #[inline(always)]
236 pub fn get_pos(&self) -> usize {
237 let pos = K::get_pos(&self.buffer, &self.pos);
238 if !K::invariant(pos, BS::USIZE) {
239 debug_assert!(false);
240 // SAFETY: `pos` never breaks the invariant
241 unsafe {
242 core::hint::unreachable_unchecked();
243 }
244 }
245 pos
246 }
247
248 /// Return slice of data stored inside the buffer.
249 #[inline(always)]

Callers 7

fmtMethod · 0.45
digest_blocksMethod · 0.45
get_dataMethod · 0.45
remainingMethod · 0.45
digest_padMethod · 0.45

Calls

no outgoing calls

Tested by 2