[][src]Struct sequoia_openpgp::packet::prelude::MDC

pub struct MDC { /* fields omitted */ }

Holds an MDC packet.

A modification detection code packet. This packet appears after a SEIP packet. See Section 5.14 of RFC 4880 for details.

A note on equality

Two MDC packets are considered equal if their serialized form is equal. This excludes the computed digest.

Implementations

impl MDC[src]

pub fn new(digest: [u8; 20], computed_digest: [u8; 20]) -> Self[src]

Creates an MDC packet.

pub fn digest(&self) -> &[u8][src]

Gets the packet's hash value.

pub fn computed_digest(&self) -> &[u8][src]

Gets the computed hash value.

pub fn valid(&self) -> bool[src]

Returns whether the data protected by the MDC is valid.

Trait Implementations

impl Clone for MDC[src]

impl Debug for MDC[src]

impl Eq for MDC[src]

impl From<[u8; 20]> for MDC[src]

impl From<Box<dyn Digest + 'static, Global>> for MDC[src]

impl From<MDC> for Packet[src]

impl Hash for MDC[src]

impl IntoIterator for MDC[src]

Implement IntoIterator so that cert::insert_packets(sig) just works.

type Item = MDC

The type of the elements being iterated over.

type IntoIter = Once<MDC>

Which kind of iterator are we turning this into?

impl Marshal for MDC[src]

impl MarshalInto for MDC[src]

impl<'a> Parse<'a, MDC> for MDC[src]

impl PartialEq<MDC> for MDC[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> DynClone for T where
    T: Clone
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.