srm

command module
v0.0.0-...-1bf2f45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

README

Secure rm for OSX

A secure delete for OSX (and other platforms if you want to cross-compile, courtesy of using Golang). Reading on secure delete techniques and decided to set on NSA 130-2, i.e. 3 passes: random, random, verify last random.

How?

Well, I just use rand.Seed(time.Now().UTC().UnixNano()) and rand.Read() for each random pass. Then I open the file before doing os.delete on it to ensure the last random was written correctly via Blake 256-bits. You can also use "rm -P" from OSX since srm is not longer available:

     -P          Overwrite regular files before deleting them.  Files are overwrit-
                 ten three times, first with the byte pattern 0xff, then 0x00, and
                 then 0xff again, before they are deleted.

Why?

Well I didnt know the wheel existed, wrote my mini srm before deciding to read the man rm... But I am still trying to learn Golang so still fun to do.

Feedbacks

Yes, I am really really learning Golang coming from Python so please PR/help/feedback really welcome on making better code, more readable, more efficient and secure if need be :)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL