SDS - Secure Document Shredder V1
A secure document destruction class. Method uses crypto api to generate random data blocks, and overwrites file in multiple passes at file offsets proportioned to file size, (for speed). All writes are done with api to ensure commits, and disk cache is flushed at bottom of each cycle.
Some good examples of various api usage, and (of course), a decent file shredder.
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
Re-scan downloaded files using your personal virus checker before using it.
NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Scan the source code with Minnow's Project Scanner
If you don't have a virus scanner, you can get one at many places on the net
Terms of Agreement:
By using this code, you agree to the following terms...
You may use
this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
You may link to this code from another website, but ONLY if it is not wrapped in a frame.
You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
Should work in 98/ME, (though crypto api is [of course], NT and up), because I left a handler and alternate random gen sub in.. Let me know, (email preferably), if you have problems on the old OSs, and if I can, I will make it backwards compatable. (Zhu! Enmity!, find the bugs! ;o) Comments welcome.. (If this comment was disrespectful, please report it.)
Actually.. I work for a large computer company, (as a neteng), and I know a lot of people who are very careful about what they leave on their comp, and how they destroy it. It is even policy in some places to use a document shredder when discarding old documents/media.. because corporate espionage is acually quite common. (If this comment was disrespectful, please report it.)
Cobein, I read the article, and yes, for compressed or encrypted files, additional work would have to be done. There is also the issue of what can [and can not] be accomplished in vb.. I will take a look through source and see if any of these concepts can be ported. Thanks (If this comment was disrespectful, please report it.)
Clean and powerful code, i appreciate it. Thanks for sharing. If you have time please convert the code to be Unicode compatible by just changing some api functions like CreateFileW, DeleteFileW and soon.
Thanks in advance.
regards, Noel (If this comment was disrespectful, please report it.)
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular code, please
click here instead.)