From 92c67b2a5abe99a90a2add5eeea27b55c0023790 Mon Sep 17 00:00:00 2001 From: Radu Marias Date: Wed, 11 Dec 2024 14:01:06 +0200 Subject: [PATCH] use SecretString --- src/encryptedfs.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/encryptedfs.rs b/src/encryptedfs.rs index c32d878c..31b1448b 100644 --- a/src/encryptedfs.rs +++ b/src/encryptedfs.rs @@ -407,7 +407,7 @@ impl From for SetFileAttr { #[derive(Debug, Clone)] pub struct DirectoryEntry { pub ino: u64, - pub name: SecretBox, + pub name: SecretString, pub kind: FileType, } @@ -423,7 +423,7 @@ impl PartialEq for DirectoryEntry { #[derive(Debug)] pub struct DirectoryEntryPlus { pub ino: u64, - pub name: SecretBox, + pub name: SecretString, pub kind: FileType, pub attr: FileAttr, } @@ -567,7 +567,7 @@ pub struct EncryptedFs { self_weak: std::sync::Mutex>>, attr_cache: ExpireValue>, FsError, AttrCacheProvider>, dir_entries_name_cache: - ExpireValue>>, FsError, DirEntryNameCacheProvider>, + ExpireValue>, FsError, DirEntryNameCacheProvider>, dir_entries_meta_cache: ExpireValue, FsError, DirEntryMetaCacheProvider>, sizes_write: Mutex>, @@ -1976,9 +1976,9 @@ impl EncryptedFs { pub async fn rename( &self, parent: u64, - name: &SecretBox, + name: &SecretString, new_parent: u64, - new_name: &SecretBox, + new_name: &SecretString, ) -> FsResult<()> { if self.read_only { return Err(FsError::ReadOnly); @@ -2115,8 +2115,8 @@ impl EncryptedFs { /// Change the password of the filesystem used to access the encryption key. pub async fn passwd( data_dir: &Path, - old_password: SecretBox, - new_password: SecretBox, + old_password: SecretString, + new_password: SecretString, cipher: Cipher, ) -> FsResult<()> { check_structure(data_dir, false).await?;