Files
cryptr/README.md

146 lines
3.7 KiB
Markdown
Raw Permalink Normal View History

2017-10-01 23:00:31 -07:00
# cryptr
2019-03-25 22:47:48 -05:00
#### A simple shell utility for encrypting and decrypting files using OpenSSL.
2017-10-01 23:00:31 -07:00
## Installation
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
git clone https://github.com/nodesocket/cryptr.git
ln -s "$PWD"/cryptr/cryptr.bash /usr/local/bin/cryptr
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
2017-11-24 12:48:52 -08:00
### Bash tab completion
2017-11-24 12:45:24 -08:00
2017-11-24 12:48:52 -08:00
Add `tools/cryptr-bash-completion.bash` to your tab completion file directory.
2017-11-24 12:45:24 -08:00
2017-10-01 23:00:31 -07:00
## API/Commands
### encrypt
2017-10-02 02:00:56 -07:00
> encrypt \<file\> - Encryptes file with OpenSSL AES-256 cipher block chaining. Writes an encrypted file out *(ciphertext)* appending `.aes` extension.
2017-10-01 23:00:31 -07:00
2017-10-01 23:14:56 -07:00
```
2019-03-25 22:42:25 -05:00
➜ cryptr encrypt ./secret-file
2017-10-02 02:00:56 -07:00
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
2017-10-01 23:14:56 -07:00
```
```
2017-10-01 23:41:30 -07:00
➜ ls -alh
2019-03-25 22:42:25 -05:00
-rw-r--r-- 1 user group 1.0G Oct 1 13:33 secret-file
-rw-r--r-- 1 user group 1.0G Oct 1 13:34 secret-file.aes
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
2017-10-04 18:22:50 -07:00
You may optionally define the password to use when encrypting using the `CRYPTR_PASSWORD` environment variable. This enables non-interactive/batch operations.
```
2019-03-25 22:42:25 -05:00
➜ CRYPTR_PASSWORD=A1EO7S9SsQYcPChOr47n cryptr encrypt ./secret-file
2017-10-04 18:22:50 -07:00
```
2017-10-01 23:00:31 -07:00
### decrypt
2017-10-02 02:00:56 -07:00
> decrypt \<file.aes\> - Decrypt encrypted file using OpenSSL AES-256 cipher block chaining. Writes a decrypted file out *(plaintext)* removing `.aes` extension.
2017-10-01 23:00:31 -07:00
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:41:30 -07:00
➜ ls -alh
2019-03-25 22:42:25 -05:00
-rw-r--r-- 1 user group 1.0G Oct 1 13:34 secret-file.aes
2017-10-01 23:14:56 -07:00
```
```
2019-03-25 22:42:25 -05:00
➜ cryptr decrypt ./secret-file.aes
2017-10-02 02:00:56 -07:00
enter aes-256-cbc decryption password:
2017-10-01 23:14:56 -07:00
```
```
2017-10-01 23:41:30 -07:00
➜ ls -alh
2019-03-25 22:42:25 -05:00
-rw-r--r-- 1 user group 1.0G Oct 1 13:35 secret-file
-rw-r--r-- 1 user group 1.0G Oct 1 13:34 secret-file.aes
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
2017-10-04 18:22:50 -07:00
You may optionally define the password to use when decrypting using the `CRYPTR_PASSWORD` environment variable. This enables non-interactive/batch operations.
```
2019-03-25 22:42:25 -05:00
➜ CRYPTR_PASSWORD=A1EO7S9SsQYcPChOr47n cryptr decrypt ./secret-file.aes
2017-10-04 18:22:50 -07:00
```
2017-10-01 23:00:31 -07:00
### help
> help - Displays help
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
➜ cryptr help
Usage: cryptr command <command-specific-options>
encrypt <file> Encrypt file
decrypt <file.aes> Decrypt encrypted file
help Displays help
version Displays the current version
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
### version
> version - Displays the current version
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
➜ cryptr version
2020-07-10 15:48:08 -05:00
cryptr 2.2.0
2017-10-01 23:14:56 -07:00
```
2017-10-01 23:00:31 -07:00
### default
> default - Displays the current version and help
```
➜ cryptr
2020-07-10 15:48:08 -05:00
cryptr 2.2.0
2017-10-01 23:00:31 -07:00
Usage: cryptr command <command-specific-options>
encrypt <file> Encrypt file
decrypt <file.aes> Decrypt encrypted file
help Displays help
version Displays the current version
```
## Changelog
https://github.com/nodesocket/cryptr/blob/master/CHANGELOG.md
## Support, Bugs, And Feature Requests
Create issues here in GitHub (https://github.com/nodesocket/cryptr/issues).
## Versioning
For transparency and insight into the release cycle, and for striving to maintain backward compatibility, cryptr will be maintained under the semantic versioning guidelines.
Releases will be numbered with the follow format:
`<major>.<minor>.<patch>`
And constructed with the following guidelines:
+ Breaking backward compatibility bumps the major (and resets the minor and patch)
+ New additions without breaking backward compatibility bumps the minor (and resets the patch)
+ Bug fixes and misc changes bumps the patch
For more information on semantic versioning, visit http://semver.org/.
## License & Legal
2019-03-25 22:42:25 -05:00
Copyright 2019 Justin Keller
2017-10-01 23:00:31 -07:00
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.