Skip to content

mrf345/safelock-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

37f475a · Feb 1, 2025

History

76 Commits
Feb 1, 2025
Sep 18, 2024
Feb 1, 2025
Feb 1, 2025
Sep 3, 2024
Sep 8, 2024
Sep 4, 2024
Aug 11, 2024
Sep 3, 2024
Sep 3, 2024
Sep 18, 2024
Sep 18, 2024
Sep 18, 2024
Sep 13, 2024

Repository files navigation

safelock-cli build status linter badge Go Reference

Fast files encryption package and command-line tool built for speed with Go and Archiver

Utilizing argon2id and chacha20poly1305 for encryption, see default options.

Install

For command-line

go install https://github.com/mrf345/safelock-cli@latest

For packages

go get https://github.com/mrf345/safelock-cli@latest

Or using one of the latest release binaries here

Examples

Encrypt a path with default options

safelock-cli encrypt path_to_encrypt encrypted_file_path

And to decrypt

safelock-cli decrypt encrypted_file_path decrypted_files_path

Tip

If you want it to run silently with no interaction use --quiet and pipe the password

echo "password123456" | safelock-cli encrypt path_to_encrypt encrypted_file_path --quiet

You can find interactive examples of using it as a package to encrypt and decrypt.

Options

Following the default options remanded by RFC9106 and crypto/argon2

Option Value
Iterations 3
Memory size 64 Megabytes
Salt length 16
Key length 32
Threads Number of available cores runtime.NumCPU()
Minimum password length 8

Performance

Note

You can reproduce the results by running bench_and_plot.py (based on Matplotlib and Hyperfine)

encryption time decryption time file size