[][src]Struct yaca::DigestContext

pub struct DigestContext { /* fields omitted */ }

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 only DigestContext::finalize() will produce a digest of an empty message.

Trait Implementations

impl Drop for DigestContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.