Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6675693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:53:27+00:00 2026-05-26T03:53:27+00:00

Secure File Deleting in C I need to securely delete a file in C,

  • 0

Secure File Deleting in C

I need to securely delete a file in C, here is what I do:

  1. use fopen to get a handle of the file
  2. calculate the size using lseek/ftell
  3. get random seed depending on current time/or file size
  4. write (size) bytes to the file from a loop with 256 bytes written each iteration
  5. fflush/fclose the file handle
  6. reopen the file and re-do steps 3-6 for 10~15 times
  7. rename the file then delete it

Is that how it’s done? Because I read the name “Gutmann 25 passes” in Eraser, so I guess 25 is the number of times the file is overwritten and ‘Gutmann’ is the Randomization Algorithm?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:53:28+00:00Added an answer on May 26, 2026 at 3:53 am

    You can’t do this securely without the cooperation of the operating system – and often not even then.

    When you open a file and write to it there is no guarantee that the OS is going to put the new file on the same bit of spinning rust as the old one. Even if it does you don’t know if the new write will use the same chain of clusters as it did before.

    Even then you aren’t sure that the drive hasn’t mapped out the disk block because of some fault – leaving your plans for world domination on a block that is marked bad but is still readable.

    ps – the 25x overwrite is no longer necessary, it was needed on old low density MFM drives with poor head tracking. On modern GMR drives overwriting once is plenty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need the package having below features: needs client based secure file transfer machanism
I'm trying to write a secure transfer file program using Python and AES and
Environment: IIS 6.0, ASP.NET 3.5 I have the need to secure just one file
I am using authentication mode=forms in web.config file. Because it is a secure application
at System.IO.__Error.WinIOError(Int32errorCode, String maybeFullPath) at System.IO.File.Delete(String path) at secure.course.ContentList.ListCourses.imgBtnExport_Click(Object sender, ImageClickEventArgs e) in secure\course\ContentList\ListCourses.aspx.cs:line
I'm using ASP.NET and rely on the web.config file to secure sections of my
I'm trying to upload large file (>100Mb) using Apache commons-net FTP library to Secure
I have a website which allows secure (ssl) file uploads and download. The site
I'd like my application to query a csv file from a secure website. I
How secure are php Sessions? I am planning to use the native PHP sessions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.