pub struct Md5Engine;Expand description
Batch MD5 engine. Construct once and reuse.
Implementations§
Source§impl Md5Engine
impl Md5Engine
Sourcepub fn backend_name(self) -> &'static str
pub fn backend_name(self) -> &'static str
Active single-stream backend name.
Sourcepub fn simd_name(self) -> &'static str
pub fn simd_name(self) -> &'static str
Multi-buffer kernel label (none unless feature simd is on and active).
Sourcepub fn lanes(self) -> usize
pub fn lanes(self) -> usize
Effective batch width for hash_many.
Maximum usable SIMD width, or 2 for the experimental scalar pair path, or 1 for sequential hashing. Individual calls may use fewer lanes.
Sourcepub fn hash_many(self, inputs: &[&[u8]], outputs: &mut [[u8; 16]])
pub fn hash_many(self, inputs: &[&[u8]], outputs: &mut [[u8; 16]])
Hash independent messages into outputs.
Contiguous equal-length runs may use SIMD when enabled and available. Other inputs use the active single-stream backend. Order is preserved; extra output slots are left unchanged. No allocation or thread spawning.
§Panics
Panics if outputs.len() < inputs.len().
Sourcepub fn hash_many_grouped(self, inputs: &[&[u8]], outputs: &mut [[u8; 16]])
pub fn hash_many_grouped(self, inputs: &[&[u8]], outputs: &mut [[u8; 16]])
Hash messages after grouping equal lengths while restoring output order.
This is for callers that own an object scheduling queue and can pay one
allocation plus an index sort to expose non-adjacent equal-length runs.
The original Self::hash_many remains allocation-free and preserves
the input order during dispatch. Grouping is used only when the sorted
workload contains a SIMD-sized run; otherwise this falls back to
Self::hash_many.
§Panics
Panics if outputs.len() < inputs.len().
Sourcepub fn hash_many_hex(self, inputs: &[&[u8]], outputs: &mut [String])
pub fn hash_many_hex(self, inputs: &[&[u8]], outputs: &mut [String])
Hash independent messages to lowercase hex (ETag-shaped).
§Panics
Panics if outputs.len() < inputs.len().
Sourcepub fn hash_one(self, input: &[u8]) -> [u8; 16]
pub fn hash_one(self, input: &[u8]) -> [u8; 16]
Hash one message via the active single-stream path.
Sourcepub fn update_many(self, states: &mut [Md5State], inputs: &[&[u8]])
pub fn update_many(self, states: &mut [Md5State], inputs: &[&[u8]])
Increment several independent streams through the scalar backend.
§Panics
Panics if states.len() != inputs.len().