https://github.com/fabiocolacio/crypt
Easily encrypt and decrypt files from cli or scripts
https://github.com/fabiocolacio/crypt
cryptography
Last synced: 9 months ago
JSON representation
Easily encrypt and decrypt files from cli or scripts
- Host: GitHub
- URL: https://github.com/fabiocolacio/crypt
- Owner: fabiocolacio
- License: zlib
- Created: 2018-12-26T03:13:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-27T18:35:54.000Z (over 7 years ago)
- Last Synced: 2025-04-09T03:41:34.570Z (about 1 year ago)
- Topics: cryptography
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Crypt
=====
Easily encrypt and decrypt files from the command line or from scripts.
Install
-------
You must have a Go compiler installed in your system to compile this program.
You can get a copy at https://golang.org/dl
You must also have Go's PBKDF2 package installed.
You can install that package with the following command:
$ go get golang.org/x/crypto/pbkdf2
You can then compile crypt from the root directory of this project with the
following command:
$ go build
You may optionally install the man page and binary to your system by running
install script with root privileges:
# sh install.sh
Usage
-----
You can easily encrypt or decrypt files by calling crypt and supplying a
file to encrypt or decrypt, and a password to encrypt or decrypt it with.
To encrypt the file named `secrets.txt`, with the password
`supersecretpassword`, issue the following command:
$ crypt -f secrets.txt -p "supersecretpassword"
The file `secrets.txt` will be encrypted, producing the file
`secrets.txt.gobbledygook`.
To decrypt the output file, run `crypt` with the `-d` file using the same
password.
$ crypt -f secrets.txt.gobbledygook -p "supersecretpassword" -d
The cleartext file will be produced as the file `secrets.txt.gobbledygook.txt`
The original file can be deleted upon successful encryption or decryption by
specifying the `--no-preserve` flag.
For detailed usage information, see the man page:
$ man crypt