pub struct MagicCrypt192 { /* private fields */ }
Expand description

This struct can help you encrypt or decrypt data via AES-192 in a quick way.

Trait Implementations§

source§

impl Clone for MagicCrypt192

source§

fn clone(&self) -> MagicCrypt192

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MagicCrypt192

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl MagicCryptTrait for MagicCrypt192

source§

fn new<S: AsRef<[u8]>, V: AsRef<[u8]>>(key: S, iv: Option<V>) -> MagicCrypt192

source§

fn encrypt_to_bytes<T: ?Sized + AsRef<[u8]>>(&self, data: &T) -> Vec<u8>

source§

fn encrypt_reader_to_bytes( &self, reader: &mut dyn Read ) -> Result<Vec<u8>, MagicCryptError>

source§

fn encrypt_reader_to_writer2<N: ArrayLength<u8> + PartialDiv<U16> + IsGreaterOrEqual<U16, Output = True>>( &self, reader: &mut dyn Read, writer: &mut dyn Write ) -> Result<(), MagicCryptError>

source§

fn decrypt_bytes_to_bytes<T: ?Sized + AsRef<[u8]>>( &self, bytes: &T ) -> Result<Vec<u8>, MagicCryptError>

source§

fn decrypt_reader_to_bytes( &self, reader: &mut dyn Read ) -> Result<Vec<u8>, MagicCryptError>

source§

fn decrypt_reader_to_writer2<N: ArrayLength<u8> + PartialDiv<U16> + IsGreaterOrEqual<U16, Output = True> + Add<B1>>( &self, reader: &mut dyn Read, writer: &mut dyn Write ) -> Result<(), MagicCryptError>where <N as Add<B1>>::Output: ArrayLength<u8>,

source§

fn encrypt_str_to_base64<S: AsRef<str>>(&self, string: S) -> String

source§

fn encrypt_str_to_bytes<S: AsRef<str>>(&self, string: S) -> Vec<u8>

source§

fn encrypt_bytes_to_base64<T: ?Sized + AsRef<[u8]>>(&self, bytes: &T) -> String

source§

fn encrypt_bytes_to_bytes<T: ?Sized + AsRef<[u8]>>(&self, bytes: &T) -> Vec<u8>

source§

fn encrypt_to_base64<T: ?Sized + AsRef<[u8]>>(&self, data: &T) -> String

source§

fn encrypt_reader_to_base64( &self, reader: &mut dyn Read ) -> Result<String, MagicCryptError>

source§

fn encrypt_reader_to_writer( &self, reader: &mut dyn Read, writer: &mut dyn Write ) -> Result<(), MagicCryptError>

source§

fn decrypt_base64_to_string<S: AsRef<str>>( &self, base64: S ) -> Result<String, MagicCryptError>

source§

fn decrypt_base64_to_bytes<S: AsRef<str>>( &self, base64: S ) -> Result<Vec<u8>, MagicCryptError>

source§

fn decrypt_reader_to_writer( &self, reader: &mut dyn Read, writer: &mut dyn Write ) -> Result<(), MagicCryptError>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.