Giter VIP home page Giter VIP logo

shred's Introduction

shred

Package shred is a golang library to mimic the functionality of the linux shred command

Usage

package main
import (
  "github.com/JojiiOfficial/shred"
)

func main(){
	shredder := shred.Shredder{}
	shredconf := shred.NewShredderConf(&shredder, shred.WriteRand|shred.WriteZeros, 1, false)
	shredconf.ShredFile("./10k")
	shredconf.ShredDir("./toShredDir")
}

Bench

Those results depend on you hardware (cpu, memory, HardDrive)!
BigFile: 1G Normalfile: 4k

goos: linux
goarch: amd64
pkg: github.com/JojiiOfficial/shred
BenchmarkShredderSecure-12       	   33700	     41533 ns/op	   10096 B/op	      11 allocs/op
BenchmarkShredder-12             	   27094	     41833 ns/op	   10096 B/op	      11 allocs/op
BenchmarkShredderBigSecure-12    	       1	1723832805 ns/op	   10104 B/op	      11 allocs/op
BenchmarkShredderBig-12          	       1	2142966496 ns/op	   10104 B/op	      11 allocs/op
PASS
ok  	github.com/JojiiOfficial/shred	7.213s

shred's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

shred's Issues

Question

Hi,

Does it make a difference to reverse the order of functions? Example:

shredconf := shred.NewShredderConf(&shredder, shred.WriteZeros|shred.WriteRand, 25, true)

What does 1 refer to? Just writing randomly or writing with zeros too? It is the number of iterations of which of the functions? Or both?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.