[][src]Struct savefile::CryptoReader

pub struct CryptoReader<'a> { /* fields omitted */ }

A cryptographic stream wrapper. Wraps a plain dyn Read, and itself implements Read, decrypting and verifying all data read.

Methods

impl<'a> CryptoReader<'a>[src]

pub fn new(
    reader: &'a mut dyn Read,
    key_bytes: [u8; 32]
) -> Result<CryptoReader<'a>, SavefileError>
[src]

Create a new CryptoReader, wrapping the given Read . Decrypts using the given 32 byte cryptographic key. Crypto is 256 bit AES GCM

Trait Implementations

impl<'a> Read for CryptoReader<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for CryptoReader<'a>

impl<'a> !Send for CryptoReader<'a>

impl<'a> !Sync for CryptoReader<'a>

impl<'a> Unpin for CryptoReader<'a>

impl<'a> !UnwindSafe for CryptoReader<'a>

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> Erased for T

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

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

impl<R> ReadBytesExt for R where
    R: Read + ?Sized
[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.

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