permadelete icon indicating copy to clipboard operation
permadelete copied to clipboard

Wipe entire logical drives

Open mhmd-azeez opened this issue 7 years ago • 5 comments

Having a way to conveniently wipe a logical drive can be very helpful for users especially when trying to wipe a thumb drive or other external storage devices.

mhmd-azeez avatar Aug 05 '18 09:08 mhmd-azeez

And maybe with this step :

  1. Initialize
  2. Load Drive
  3. Check Drive Type, make sure it's not System drive.
  4. Calculate Size, make sure User concern about the data.
  5. Confirm Wipe out {0} In Size.
  6. Wiping Out Asynchronously
  7. Done, give message to User

rasyidf avatar Jan 05 '19 23:01 rasyidf

@rasyidf thank you for your suggestion, would you like to implement it? I'll help you along the way 😁

mhmd-azeez avatar Jan 06 '19 06:01 mhmd-azeez

@encrypt0r No Problem, working on it.

rasyidf avatar Jan 08 '19 17:01 rasyidf

Ah, It seems the program structure is too complicated to just add a feature.

maybe we could discuss here:

What approach will be used as this operation:

  • [ ] Users Drag and Drop Logical.
  • [ ] Add New Wizard for Listing Drives.

rasyidf avatar Jan 08 '19 18:01 rasyidf

@rasyidf I agree it takes a while to get familiarized with the code base, so why don't we start with something that might not need to change the UI very much. Create a ShredDriveAsync method in ShredderService. The algorithm could look like this:

  1. Make sure the drive is not on an SSD (Use ShredderService.IsDriveSSD for that). Here is why. Also make sure the drive is not the system drive, we don't want the user to mess up their computer.
  2. Fill up the free space on the drive by generating junk files. You can take a look at ShredderService.OverWriteFile for more information about that. You can either reuse it, or write a new method that creates a new file with arbitary length that that contains random bytes and has a random name.
  3. After all of the drives space is used up, delete all of the generated files (a simple delete would do).
  4. Shred all of the folders on the drive by using ShredderService.ShredFolderAsync
  5. Shred all of the files in the root of the drive (the files in the folders are already taken care of by ShredFolderAsync) by using ShredderService.ShredFileAsync.

After this step is done, then we can integrate it into the UI, in the meantime, you can create a temp button for yourself while you're testing the new feature.

mhmd-azeez avatar Jan 08 '19 19:01 mhmd-azeez