Simple, fast and lightweight CLI data locking tool built in rust.
Encryption process:
- Encrypt the file contents using Chacha20poly1305 and save them to a file with an extension 'lok'.
- Combine the nonce, salt used in the encryption, and the file extension.
- Encrypt the combined values using stored binary data to secure them.
- Encode everything to base64 using a custom engine, then convert to binary to increase the file size before compressing.
- Delete the original file from the system.
Decryption process:
- Decompress and then decode the data.
- Extract the encrypted combined values, and decrypt them.
- Extract the encrypted file contents.
- Using the decrypted values to decrypt the extracted file contents and restore the file to its original state.
- 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.
# 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