magic_crypt

Struct MagicCrypt192

Source
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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.