Giter VIP home page Giter VIP logo

datalok's Introduction

Build Status Crypto Crate Base64 Crate

Simple, fast and lightweight CLI data locking tool built in rust.

How The Process Works

Encryption process:

  1. Encrypt the file contents using Chacha20poly1305 and save them to a file with an extension 'lok'.
  2. Combine the nonce, salt used in the encryption, and the file extension.
  3. Encrypt the combined values using stored binary data to secure them.
  4. Encode everything to base64 using a custom engine, then convert to binary to increase the file size before compressing.
  5. Delete the original file from the system.

Decryption process:

  1. Decompress and then decode the data.
  2. Extract the encrypted combined values, and decrypt them.
  3. Extract the encrypted file contents.
  4. Using the decrypted values to decrypt the extracted file contents and restore the file to its original state.

Password File Examples

  • A random stream of characters inside a file.
  • The contents of a file already on your computer.
  • Generate a unique cryptographic key to use inside a file.
  • Append numbers or letters to an existing file to create a password file. With the ability to remove the appended characters after encryption, and only add them back before decryption.

How to Use

# Build from source
# Build location: datalok/target/release/datalok
cd "download folder"/datalok
cargo build --release

# Example usage:
# datalok <file/folder> [-s] <-e | -d> [-r] [-p]

#  Flags:
#    -e Encryption 
#    -d Decryption 
#    -s Start a session
#    -r Recursively processes files in a directory
#    -p Prompted to type in a password

# Encrypt a file:
  datalok <file> -e
# Encrypt a file by entering a password:
  datalok <file> -e -p
# Decrypt a folder recursively:
  datalok <folder> -d -r
# Start a session:
  datalok -s
# Start a session by entering a password:
  datalok -s -p

Session features include:

  • Stores the password or password file for the duration of the session.
  • Capable of encrypting or decrypting files from any location on the system.
  • Uses the system file explorer when selecting files or folders to process.
# Example session usage:
#  <e | d> [-r]

#  Commands:
#    e | encrypt - Encryption
#    d | decrypt - Decryption
#    h | help - Shows all commands
#    exit - Exits the session
  
#  Flags:
#    -r Recursively processes files in a directory

# Encrypt a folder recursively:
  e -r
# Decrypt a folder recursively:
  decrypt -r 

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.