Skip to content

mrf345/safelock-cli

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