pub struct EncryptedFile { /* private fields */ }Expand description
TODO checking file sizes Update add_file_digest when cheking stream size will be stable unwraps to expect
Implementations§
Source§impl EncryptedFile
impl EncryptedFile
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn zip_file_options(&self) -> &FileOptions
pub fn set_zip_file_options(&mut self, file_options: FileOptions)
pub fn associated_data(&self) -> &[u8] ⓘ
pub fn change_associated_data(&mut self, associated_data: Vec<u8>)
pub fn change_buffor_size(&mut self, buffor_size: usize)
pub fn buffor_size(&self) -> usize
pub fn get_directory_content_soft(&self) -> Option<&DirectoryContent>
pub fn get_directory_content( &mut self, ) -> EncryptedFileResult<&DirectoryContent>
pub fn get_directory_content_hard( &mut self, ) -> EncryptedFileResult<&DirectoryContent>
pub fn add_file<I: Read>( &mut self, src: I, dst_path: &DirectoryContentPath, public_key: &PublicKey, ) -> EncryptedFileResult<()>
pub fn add_file_and_sign<I: Read>( &mut self, src: I, dst_path: &DirectoryContentPath, public_key: &PublicKey, private_key: &RsaPrivateKey, ) -> EncryptedFileResult<()>
pub fn decrypt_file<O: Write>( &self, src: &DirectoryContentPath, dst: O, private_key: &PrivateKey, ) -> DecryptFileResult
pub fn decrypt_file_and_verify<O: Write>( &self, src: &DirectoryContentPath, dst: O, private_key: &PrivateKey, public_key: &RsaPublicKey, ) -> DecryptFileAndVerifyResult
pub fn add_directory<P: AsRef<Path>>( &mut self, src: P, dst: DirectoryContentPath, public_key: &PublicKey, ) -> EncryptedFileResult<Vec<(Box<Path>, EncryptedFileResult<()>)>>
pub fn add_directory_callback<P, B, E, A>( &mut self, src: P, dst: DirectoryContentPath, public_key: &PublicKey, before: B, callback: E, after: A, ) -> EncryptedFileResult<Vec<(Box<Path>, EncryptedFileResult<()>)>>
pub fn add_directory_and_sign<P: AsRef<Path>>( &mut self, src: P, dst: DirectoryContentPath, public_key: &PublicKey, private_key: &RsaPrivateKey, ) -> EncryptedFileResult<Vec<(Box<Path>, EncryptedFileResult<()>)>>
pub fn add_directory_and_sign_callback<P, B, E, A>( &mut self, src: P, dst: DirectoryContentPath, public_key: &PublicKey, private_key: &RsaPrivateKey, before: B, callback: E, after: A, ) -> EncryptedFileResult<Vec<(Box<Path>, EncryptedFileResult<()>)>>
pub fn decrypt_directory<P: AsRef<Path>>( &self, src: DirectoryContentPath, dst: P, private_key: &PrivateKey, ) -> EncryptedFileResult<Vec<(String, DecryptFileResult)>>
pub fn decrypt_directory_callback<P, B, E, A>(
&self,
src: DirectoryContentPath,
dst: P,
private_key: &PrivateKey,
before: B,
callback: E,
after: A,
) -> EncryptedFileResult<Vec<(String, DecryptFileResult)>>where
P: AsRef<Path>,
B: FnOnce(usize),
E: FnMut(&DirectoryContentPath, &str, &DecryptFileResult),
A: FnOnce(bool),
pub fn decrypt_directory_and_verify<P: AsRef<Path>>( &self, src: DirectoryContentPath, dst: P, private_key: &PrivateKey, public_key: &RsaPublicKey, ) -> EncryptedFileResult<Vec<(String, DecryptFileAndVerifyResult)>>
pub fn decrypt_directory_and_verify_callback<P, B, E, A>(
&self,
src: DirectoryContentPath,
dst: P,
private_key: &PrivateKey,
public_key: &RsaPublicKey,
before: B,
callback: E,
after: A,
) -> EncryptedFileResult<Vec<(String, DecryptFileAndVerifyResult)>>where
P: AsRef<Path>,
B: FnOnce(usize),
E: FnMut(&DirectoryContentPath, &str, &DecryptFileAndVerifyResult),
A: FnOnce(bool),
pub fn delete_path<O: Write + Seek>( &self, output: O, to_delete: &Vec<DirectoryContentPath>, ) -> EncryptedFileResult<()>
Auto Trait Implementations§
impl Freeze for EncryptedFile
impl RefUnwindSafe for EncryptedFile
impl Send for EncryptedFile
impl Sync for EncryptedFile
impl Unpin for EncryptedFile
impl UnwindSafe for EncryptedFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more