pub struct XorHash { /* private fields */ }Expand description
One-byte XOR-fold hash. State is a single accumulator byte.
Implementations§
Trait Implementations§
Source§impl HashPlugin for XorHash
impl HashPlugin for XorHash
Source§fn create_with_opts(
_name: &str,
_opts: Option<OptionView<'_>>,
) -> PluginResult<Self>
fn create_with_opts( _name: &str, _opts: Option<OptionView<'_>>, ) -> PluginResult<Self>
Construct a new hash instance for the named algorithm. Read more
Source§fn output_size(&self) -> u32
fn output_size(&self) -> u32
Output length in bytes for this instance. The caller allocates a
buffer of this size before calling
finalize.Source§fn block_size(&self) -> u32
fn block_size(&self) -> u32
Internal block size in bytes. Used by callers that want to feed
input in aligned chunks; safe to return a constant (e.g. 64) if
the algorithm doesn’t have a meaningful block size.
Source§fn reset(&mut self) -> PluginResult<()>
fn reset(&mut self) -> PluginResult<()>
Reset to the initial state (post-
create).Source§fn try_clone(&self) -> PluginResult<Self>
fn try_clone(&self) -> PluginResult<Self>
Duplicate the hash state. The clone must be independent: updates
to one must not affect the other.
Auto Trait Implementations§
impl Freeze for XorHash
impl RefUnwindSafe for XorHash
impl Send for XorHash
impl Sync for XorHash
impl Unpin for XorHash
impl UnsafeUnpin for XorHash
impl UnwindSafe for XorHash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more