pub struct Digest(/* private fields */);Expand description
Hashing wrapper type.
Implementations§
Source§impl Digest
impl Digest
Sourcepub fn iterated(
salt: &[u8],
bytes: &[u8],
type: DigestType,
iterations: u16,
) -> Result<Digest, ProtoError>
pub fn iterated( salt: &[u8], bytes: &[u8], type: DigestType, iterations: u16, ) -> Result<Digest, ProtoError>
Hashes the given data iterations times with the given salt and r#type.
Sourcepub fn from_iter<'a>(
bytes: impl IntoIterator<Item = &'a [u8]>,
type: DigestType,
) -> Result<Digest, ProtoError>
pub fn from_iter<'a>( bytes: impl IntoIterator<Item = &'a [u8]>, type: DigestType, ) -> Result<Digest, ProtoError>
Hashes the data from the bytes iterator with the given r#type.
Sourcepub fn new(bytes: &[u8], type: DigestType) -> Result<Digest, ProtoError>
pub fn new(bytes: &[u8], type: DigestType) -> Result<Digest, ProtoError>
Hashes
Trait Implementations§
impl Copy for Digest
Auto Trait Implementations§
impl Freeze for Digest
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnsafeUnpin for Digest
impl UnwindSafe for Digest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)