pub struct HashingManager { /* private fields */ }Expand description
哈希门面。
Implementations§
Source§impl HashingManager
impl HashingManager
pub fn new( registry: Registry<Box<dyn Hasher>>, default_identifier: impl Into<String>, ) -> Result<Self>
pub fn digest(&self, data: &[u8]) -> Result<Vec<u8>>
pub fn digest_with(&self, identifier: &str, data: &[u8]) -> Result<Vec<u8>>
pub fn digest_hex(&self, data: &[u8]) -> Result<String>
pub fn digest_hex_with(&self, identifier: &str, data: &[u8]) -> Result<String>
pub fn registry(&self) -> &Registry<Box<dyn Hasher>>
pub fn registry_mut(&mut self) -> &mut Registry<Box<dyn Hasher>>
pub fn default_identifier(&self) -> &str
pub fn set_default_identifier( &mut self, identifier: impl Into<String>, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HashingManager
impl !UnwindSafe for HashingManager
impl Freeze for HashingManager
impl Send for HashingManager
impl Sync for HashingManager
impl Unpin for HashingManager
impl UnsafeUnpin for HashingManager
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