Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quackduck/secret
Encrypt anything with a password
https://github.com/quackduck/secret
Last synced: 2 months ago
JSON representation
Encrypt anything with a password
- Host: GitHub
- URL: https://github.com/quackduck/secret
- Owner: quackduck
- License: mit
- Created: 2021-03-22T12:51:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-20T21:33:47.000Z (about 3 years ago)
- Last Synced: 2024-10-28T09:53:11.382Z (3 months ago)
- Language: Go
- Size: 39.1 KB
- Stars: 36
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hackclub - Secret - [@quackduck](https://github.com/quackduck) - **(Go)** _Encrypt any file with a password super easily!_ (CLI Tools)
README
# Secret - Encrypt anything with a password
Ever wanted to hide a file? Now you can do it really easily!
[![asciicast](https://asciinema.org/a/401528.svg)](https://asciinema.org/a/401528?speed=2&autoplay=1)
## Usage
```text
secret {-e/--encrypt | -d/--decrypt} []
secret [-h/--help | -v/--version]
```For example, run:
```shell
echo "foobardata" > foo.txt
secret --encrypt foo.txt
```
You will be prompted for a password that you can use to recover data later.
```text
Password:
```After you input your password, Secret will make an encrypted `foo.txt.secret` file.
Then, when you want to decrypt `foo.txt.secret`, you can run:
```shell
secret --decrypt foo.txt.secret bar.txt
```
You must enter the same password you had when you encrypted the data.Secret then decrypts `foo.txt.secret` and writes the data to a new file, `bar.txt`.
If you didn't specify `bar.txt`, Secret would try to write to `foo.txt`. However, Secret will never overwrite files and so it would print an error.
Now `bar.txt` and `foo.txt` are exactly the same! (you can check this with `diff`)
For larger files, Secret shows progress bars that indicate how much data has been encrypted or decrypted and even provides estimates for how much time is remaining.
```text
Decrypting 33% ████████████ (687 MB/2.0 GB, 304.783 MB/s) [2s:4s]
```You can also use pipes to specify the password (this can be useful in scripts):
```shell
echo "mypass" | secret -e foo # use "mypass" as password and encrypt foo
```### Details
```text
Options:
-e, --encrypt Encrypt the source file and save to destination. If no
destination is specified, secret makes a new file with a
.secret extension. This option reads for a password.
-d, --decrypt Decrypt the source file and save to destination. If no
destination is specified, secret makes a new file without
the .secret extension. This option reads for a password.
-h, --help Display this help message
-v, --version Show secret's version
```## Installing
```shell
brew install quackduck/tap/secret # works for Linuxbrew too!
```
or get an executable from [releases](https://github.com/quackduck/secret/releases).## Uninstalling
```shell
brew uninstall quackduck/tap/secret
```
or on Unix,
```shell
rm $(which secret)
```
or just delete it from wherever you installed the binary.## Implementation details
Secret uses AES, GCM, Scrypt with N = 2^15, r = 8, p = 1 and a high quality, 32 byte random salt for deriving a key.