[][src]Struct irmaseal_core::stream::OpenerUnsealed

pub struct OpenerUnsealed<R: Readable> { /* fields omitted */ }

Second stage opener of an IRMAseal encrypted bytestream.

Warning: will only validate the authenticity of the plaintext when calling validate.

Methods

impl<R: Readable> OpenerUnsealed<R>[src]

pub fn read(&mut self) -> Result<&[u8], Error>[src]

Read up to BLOCKSIZE bytes at a time.

pub fn validate(self) -> bool[src]

Will check the HMAC once the entire stream is exhausted. Will only yield the correct value once the entire stream is read using write_to, or by manually calling write until Error::EndOfStream is yielded.

pub fn write_to<W: Writable>(&mut self, w: &mut W) -> Result<(), Error>[src]

Will block and write the entire stream to the argument writer.

Auto Trait Implementations

impl<R> Unpin for OpenerUnsealed<R> where
    R: Unpin

impl<R> Send for OpenerUnsealed<R> where
    R: Send

impl<R> Sync for OpenerUnsealed<R> where
    R: Sync

impl<R> UnwindSafe for OpenerUnsealed<R> where
    R: UnwindSafe

impl<R> RefUnwindSafe for OpenerUnsealed<R> where
    R: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for 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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,