[−][src]Struct yaca::DigestContext
Context for Digest
operations
Implementations
impl DigestContext
[src]
pub fn initialize(algo: &DigestAlgorithm) -> Result<DigestContext>
[src]
Initializes a digest context
algo
is a digest algorithm that will be used to calculate message digest.
pub fn update(&self, message: &[u8]) -> Result<()>
[src]
Feeds the message into the message digest algorithm
message
is a chunk of data to calculate digest from.
pub fn finalize(&self) -> Result<Vec<u8>>
[src]
Calculates the final digest
- Returns the calculated digest.
- Skipping
DigestContext::update()
and calling onlyDigestContext::finalize()
will produce a digest of an empty message.
Trait Implementations
impl Drop for DigestContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for DigestContext
impl !Send for DigestContext
impl !Sync for DigestContext
impl Unpin for DigestContext
impl UnwindSafe for DigestContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,