Git Product home page Git Product logo

darlene's Introduction

Darlene

A Symmetric Encryption Tool.

darlene


Note: When Darlene encrypts data, be it a text/binary file, array, string/JSON or Buffer, she outputs a darlene (drln) file, which allows Darlene preserve the necessary metadata for decrypting the data later on.


Tip: After decrypting, remember to convert back to Buffer; hex/base64 string is returned.

Check the sample code for more info.

  • Darlene can encrypt just about anything:

    • JSON
    • String/Plain text
    • Buffer
    • Arrays (using JSON)
    • Plain Text, JSON, & Binary files
  • and only decrypt Darlene (drln) files.

Note on JSON and Binary Content

Ensure to include the binary flag (-B) when encrypting binary files. Usually these are files that display garbage data when opened in a text editor, e.g. '.png', '.pdf', '.docx', '.exe', '.AppImage', etc. As for JSON content, use the json flag (-J or --json) when encryptin JSON files.

Without the above flags, both encrypted JSON and Binary files would not be properly decrypted back to their original formats.

Caution: If you are decrypting binary content that requires exec (+x) permissions, include the -X or --exec flag. You could also use the flag if you aren't sure whether the binary content being decrypted would require exec permissions.


Upgrading from version 0.5.x

After the v0.6.0 release, the drln file structure was changed to make reading the drln file data easier, and to also make discovery of drln files easier as they now begin with the 4 Byte magic number '44 4E 17 29' (or 'DN\u0017)' when decoded using 'utf-8').

If you are trying to decrypt an older drln file created by darlene v0.5.x or older, include the -legacy or -L flag.

Note: If you are not sure whether a drln file is a legacy drln file, try decrypting normally (i.e. $ darlene -f [drln file] -o [output file] -D ...), if you get the following error: "darlene: Darlene file contains an invalid magic number.", then it is likely that the drln file is a legacy file, as legacy files had no magic number, which means you should include the legacy flag (-L or --legacy). Additionally, if after adding the legacy flag you get the following error: "darlene: Darlene file does not have a valid version number.", then it is likely that the file is not a drln file.

Install CLI

NPM

npm install -g darlene

# Note: If you get an 'EACCES' error run the command below instead
sudo npm install -g darlene --unsafe-perm=true --allow-root

Locally

# Clone repo from GitHub
git clone https://github.com/Zero-1729/Darlene

# Enter folder and give proper executable access to cli file
cd Darlene && npm run prepare

# Gloabally install cli package 
npm install -g . 

# Note: If you get an 'EACCES' error run the command below instead
sudo npm install -g . --unsafe-perm=true --allow-root

Uninstall

NPM

npm uninstall -g darlene

# Note: If you get an 'EACCES' error run the command below instead
sudo npm install -g darlene --unsafe-perm=true --allow-root

Locally

npm uninstall -g .

# Note: If you get an 'EACCES' error run the command below instead
sudo npm install -g . --unsafe-perm=true --allow-root

MIT © 2019-present (Zero-1729)

darlene's People

Contributors

zero-1729 avatar

Stargazers

Sudiro avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

qalander

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.