Skip to content

Unify file name encryption#128

Merged
d2dyno1 merged 8 commits into
masterfrom
imp_ciphernames
May 20, 2026
Merged

Unify file name encryption#128
d2dyno1 merged 8 commits into
masterfrom
imp_ciphernames

Conversation

@d2dyno1
Copy link
Copy Markdown
Member

@d2dyno1 d2dyno1 commented May 19, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to unify filename encryption/decryption logic across the abstract and native filesystem layers by centralizing name crypto + directory-id handling into AbstractPathHelpers helpers, and then migrating call sites (Recycle Bin + Health repair) to use those helpers.

Changes:

  • Refactored ciphertext name resolution to use AbstractPathHelpers.EncryptNameAsync(...) / DecryptNameAsync(...) (and related new helper overloads).
  • Added an overload of GetDirectoryIdAsync(...) that works with an explicit contentFolder parameter for non-FileSystemSpecifics call sites.
  • Updated Recycle Bin and Health repair helpers to rely on the unified name encryption helpers.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Core/SecureFolderFS.Core.FileSystem/Helpers/RecycleBin/Native/NativeRecycleBinHelpers.Operational.cs Uses unified name decryption earlier and attempts to unify Directory ID usage when writing recycle-bin metadata.
src/Core/SecureFolderFS.Core.FileSystem/Helpers/RecycleBin/Abstract/AbstractRecycleBinHelpers.Operational.cs Switches delete path to a single “delete immediately” helper and adopts unified decrypt/encrypt helpers for recycle-bin metadata.
src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/Abstract/AbstractPathHelpers.Paths.cs Replaces manual name crypto + extension concatenation with EncryptNameAsync / DecryptNameAsync.
src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/Abstract/AbstractPathHelpers.Names.cs Introduces/extends centralized helpers for name encrypt/decrypt, including overloads for explicit Security + contentFolder.
src/Core/SecureFolderFS.Core.FileSystem/Helpers/Paths/Abstract/AbstractPathHelpers.Directory.cs Adds a GetDirectoryIdAsync overload that takes contentFolder explicitly.
src/Core/SecureFolderFS.Core.FileSystem/Helpers/Health/HealthHelpers.Name.cs Removes duplicated Directory ID read/encrypt logic and uses AbstractPathHelpers.EncryptNameAsync(...).
src/Core/SecureFolderFS.Core.FileSystem/Helpers/Health/HealthHelpers.Directory.cs Uses unified “encrypt new name” helper when renaming children after regenerating Directory ID.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@d2dyno1 d2dyno1 requested a review from Copilot May 19, 2026 23:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

@d2dyno1 d2dyno1 added the approved The pull request has been reviewed and approved label May 20, 2026
@d2dyno1 d2dyno1 marked this pull request as ready for review May 20, 2026 10:15
@d2dyno1 d2dyno1 merged commit afe0259 into master May 20, 2026
59 checks passed
@d2dyno1 d2dyno1 deleted the imp_ciphernames branch May 20, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved The pull request has been reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants