[][src]Struct rclone_crypt::cipher::Cipher

pub struct Cipher {
    pub file_key: FileKey,
    pub name_key: NameKey,
    pub tweak_key: TweakKey,
    // some fields omitted
}

Fields

file_key: FileKey

The key used for file encryption. This is generated from the password and salt using scrypt.

name_key: NameKey

The key used for name encryption. This is generated from the password and salt using scrypt. TODO this might be obfuscation only

tweak_key: TweakKey

The tweak used for name encryption. This is generated from the password and salt using scrypt.

Methods

impl Cipher[src]

pub fn new(password: String, salt: String) -> Result<Self>[src]

pub fn encrypt_path(&self, path: &PathBuf) -> Result<PathBuf>[src]

pub fn decrypt_path(&self, path: &PathBuf) -> Result<PathBuf>[src]

pub fn encrypt_file_name(&self, name: &String) -> Result<String>[src]

pub fn decrypt_file_name(&self, name: &String) -> Result<String>[src]

Trait Implementations

impl Clone for Cipher[src]

impl Debug for Cipher[src]

Auto Trait Implementations

impl RefUnwindSafe for Cipher

impl Send for Cipher

impl Sync for Cipher

impl Unpin for Cipher

impl UnwindSafe for Cipher

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> 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.