Memory Erasure v1.7.0 Documentation
Table of contents
Installation
npm i memory-erasure
Description
Node.js package intended to replace the deleted file content with random numbers. It fills the whole free disk space with 1MB of data on each iteration. This package is useful when you want to completely erase the sensitive data from the disk sectors after you delete the file(s) that contain this sensitive data.
Usage example
import { eraseMemory } from 'memory-erasure'
eraseMemory((err, status) => {
if (err) console.error(err)
else if (status)
console.log(`erased ${status.erasedMemoryByteLength / 1e6 / 1e3} GB`)
})
API
Interfaces
type Callback = (err: any, data: null | IStatus) => void
interface IStatus {
erasedMemoryByteLength: number
finished: boolean
}
eraseMemory
cb: Callback
- Returns:
IStatus