Skip to content

ServerDeveloper9447/SecureFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureFile

A minimalist file encryptor and decryptor.

Getting Started

// require the package
const { SecureFile } = require('securefile')
// or import it
import { SecureFile } from 'securefile'

// initialize
const secure = new SecureFile('<your secret key here>')

secure.encrypt('<filePath>', encryptionOptions) // returns {fileName: string, filePath: string}

secure.decrypt('<filePath>', overwrite?: boolean) // returns {fileName: string, filePath: string}

Encryption Options

Options Type Default Value Description
overwrite? boolean true Instead of creating a separate file, it overwrites the existing file.
rename? boolean true Renames the original file to a cryptic name. Ignored when overwrite is set to false

Bulk Encryption and Decryption

secure.encryptMany([{filePath: string, overwrite?: boolean, rename?: boolean},...])
// or
secure.encryptFolder('<folder_path'>) // encrypts each file inside a folder

secure.decryptMany([{filePath: string, overwrite: boolean}],...)
// or
secure.decryptFolder('<folder_path>') // decrypts each file inside a folder

Use from Terminal

encrypt <key> fileName
decrypt <key> fileName

About

A minimalistic file encryptor and decryptor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published