Crates.io | chargo |
lib.rs | chargo |
version | 0.1.2 |
source | src |
created_at | 2022-12-10 14:15:26.794935 |
updated_at | 2022-12-10 16:58:46.967168 |
description | Chargo is a tool for file encryption/decryption with password. It's based on Argon2 and ChaCha20Poly1305 algorithms. |
homepage | |
repository | https://github.com/arg2u/chargo |
max_upload_size | |
id | 733852 |
size | 29,649 |
Chargo is a tool for file encryption/decryption with password. It's based on Argon2 and ChaCha20Poly1305 algorithms. From arg2u with ♥
To use Chargo you need to install Cargo and Rust. Just paste into your terminal window:
curl https://sh.rustup.rs -sSf | sh
cargo install chargo
chargo [OPTIONS] <mode> -i <input> -p <pwd>
-h, --help Prints help information
-V, --version Prints version informat
-i <input> Input file path
-o <output> Out file path. If it is not provided, Chargo will override input file
-p <pwd> Path to a password file
<mode> Set mode decrypt or encrypt
In-Terminal usage
chargo encrypt -p password.txt -i myfile.txt -o myfile.chargo
chargo decrypt -p password.txt -i myfile.chargo -o myfile.txt
In-Code usage
use chargo::{encrypt_to_file, decrypt_from_file};
use std::path::PathBuf;
fn main() {
encrypt_to_file(PathBuf::from("pwd.txt"), PathBuf::from("file.txt"), Some(PathBuf::from("file.chargo"))).unwrap();
decrypt_from_file(PathBuf::from("pwd.txt"), PathBuf::from("file.chargo"), Some(PathBuf::from("file.txt"))).unwrap();
}
ETH: 0xd66e9d65EB278075859881A56B9027Da3260533E
MIT