# crypto
## Simple symmetric GPG file encryption and decryption
## About
crypto provides a simple interface to symmetric Gnu Privacy Guard (gpg) encryption and decryption for one or more files on Unix and Linux platforms. It runs on top of gpg and requires a gpg install on your system. Encryption is performed with the AES256 cipher algorithm.
Encryption benchmarks vs. default gpg encryption are available [here](http://chrissimpkins.github.io/crypto/benchmarks.html) with additional details for [text](http://chrissimpkins.github.io/crypto/text-benchmarks.html), [pdf](http://chrissimpkins.github.io/crypto/pdf-benchmarks.html), [mp3](http://chrissimpkins.github.io/crypto/mp3-benchmarks.html), and [png](http://chrissimpkins.github.io/crypto/png-benchmarks.html) mime types.
crypto provides a number of options including automated tar archives of multiple files prior to encryption, portable ASCII armored encryption formatting, and SHA256 hash digest generation for your encrypted files.
## Documentation
Detailed documentation is available [here](http://chrissimpkins.github.io/crypto/index.html).
## Quickstart
#### Encrypt a File
```
$ crypto sometext.txt
```
#### Encrypt with Portable ASCII Armored Format
```
$ crypto --armor sometext.txt
```
#### Encrypt Multiple Files with Same Passphrase
```
$ crypto sometext.txt anotherimage.jpg
```
#### Encrypt Multiple Files with Wildcard Expansion
```
$ crypto *.txt
```
#### Encrypt and Generate SHA256 Hash Digest of the Encrypted File
```
$ crypto --hash sometext.txt
```
#### Encrypt All Top Level Files in Multiple Directories with Same Passphrase
```
$ crypto imagedir privatedir
```
#### Pack Multiple Files in a Tar Archive, Then Encrypt the Archive
```
$ crypto --tar privatedir
```
#### Decrypt a File
```
$ decrypto sometext.txt.crypt
```
#### Decrypt All Encrypted Files in Top Level of Directory
```
$ decrypto privatedir
```
#### Decrypt Text to Standard Output Stream
```
$ decrypto --stdout sometext.txt.gpg
```
## Install
### 1) Install GPG
#### Mac OSX Users
Mac OSX users can install gpg from [source](https://www.gnupg.org/download/index.html), with [Homebrew](http://brew.sh/), or by installing the [Mac GPG Tools Suite](https://gpgtools.org/gpgsuite.html).
The Homebrew install command is:
```
brew install gpg
```
Please refer to the detailed documentation on the Gnu Privacy Guard and Mac GPG Tools suite sites for more information if you choose the source or GPG Tools approaches.
#### Linux Users
If gpg is not installed on your Linux distro, you can use your package manager to install it or compile and install it from the [source](https://www.gnupg.org/download/index.html).
### 2) Install crypto
You can install crypto with [pip](https://pypi.python.org/pypi/pip/):
```
pip install crypto
```
or download the [crypto source](https://github.com/chrissimpkins/crypto/archive/master.zip), unpack it, navigate to the top level directory, and install with the command:
```
python setup.py install
```
## Options
### crypto Options
#### `--armor | -a`
Encrypt in a portable ASCII armored format
#### `--hash`
Generate SHA256 hash digest of encrypted file(s)
#### `--space`
Favor reduced file size over encryption speed
#### `--speed`
Favor encryption speed over reduced file size
#### `--tar`
Create tar archives from directories of files, then encrypt
### decrypto Options
#### `--nountar`
Do not automatically unpack tar archives after decryption
#### `--overwrite | -o`
Overwrite an existing file with the new decrypted file
#### `--stdout | -s`
Push the decrypted data to the standard output stream instead of generating a new file
### Other Options
#### `--help | -h`
View the help documentation
#### `--usage`
View the usage documentation
#### `--version | -v`
View the crypto version number
## Issues
Please submit a [new issue report on the GitHub repository](https://github.com/chrissimpkins/crypto/issueshttps://github.com/chrissimpkins/crypto/issues) with a detailed overview of the problem that you are having.
## Project Contributors
- [Christoph Russ](https://github.com/christophruss) (@christophruss)
---
[MIT License](https://github.com/chrissimpkins/crypto/blob/master/docs/LICENSE) | Built with the [Naked Framework](https://pypi.python.org/pypi/Naked)
没有合适的资源?快使用搜索试试~ 我知道了~
简单的对称GPG文件加解密.zip
共82个文件
py:29个
txt:21个
crypt:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 60 浏览量
2023-03-26
23:56:39
上传
评论
收藏 242KB ZIP 举报
温馨提示
简单的对称GPG文件加解密.zip
资源推荐
资源详情
资源评论
收起资源包目录
简单的对称GPG文件加解密.zip (82个子文件)
crypto-master
lib
__init__.py 0B
crypto
__init__.py 0B
app.py 14KB
library
__init__.py 0B
cryptor.py 9KB
hash.py 847B
package.py 2KB
decryptoapp.py 22KB
settings.py 4KB
profiler.py 2KB
debug_runner.py 64B
setup.py 2KB
LICENSE 1KB
tests
__init__.py 0B
test_decrypt-single-directory.py 8KB
test_single-directory.py 3KB
test_single-file.py 5KB
testdir10
sourcedir
nofile.tar.crypt 10KB
subdirs.tar.crypt 10KB
multifile.tar.crypt 10KB
singlefile
test.txt 15B
subdirs
dir1
test.txt 14B
multifile
test2.txt 16B
test.txt 16B
test3.txt 16B
singlefile.tar.crypt 10KB
test_ascii-armored.py 7KB
testdir1
tiger.jpg 14KB
test1.txt 34B
.testfile 18B
banana.gif 85KB
star.png 49KB
testcrypt.txt.crypt 17B
testdir11
testtar
esc_test2.txt 81B
esc_test.txt 74B
esc_test2.txt 81B
esc_test.txt 74B
testdir4
.testfile 18B
testcrypt.txt.crypt 31B
test_decrypt-single-file.py 10KB
testdir2
test1.txt 16B
test2.txt 23B
testcrypt.txt.crypt 31B
test_decrypt-multi-directory.py 8KB
test_multi-directory.py 4KB
test_tar-archive.py 9KB
testdir5
test5 96B
test4.txt.crypt 79B
test3.txt.asc 244B
test1.txt.crypt 97B
test4.txt 0B
test2.txt.gpg 99B
test_hash-digests.py 2KB
testdir7
uni_test2.txt 53B
uni_test.txt 42B
test.sh 2KB
testdir9
tar_dir
test.txt 18B
tar_dir_two
test.txt 18B
nontar.txt 13B
testdir8
test.py.crypt 741B
test2.py.crypt 783B
test_escaping-passphrase.py 7KB
test_decrypt-untar.py 20KB
test_compression-checks.py 4KB
test_decrypt-multi-file.py 7KB
attributions.txt 245B
test_multi-file.py 5KB
testdir6
test1.txt 35B
test2.txt 35B
test1.txt.crypt 107B
test2.txt.gpg 107B
test_unicode-passphrase.py 2KB
tox.ini 197B
docs
README.rst 2KB
LICENSE 1KB
TODO 177B
MANIFEST.in 24B
.gitignore 773B
setup.cfg 21B
README.md 4KB
AUTHORS.md 91B
scripts
benchmarks.py 259B
共 82 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功