Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honza/sifra
https://github.com/honza/sifra
Last synced: about 5 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/honza/sifra
- Owner: honza
- Created: 2012-01-13T20:08:24.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-01-13T20:09:20.000Z (almost 13 years ago)
- Last Synced: 2024-04-16T01:44:56.551Z (7 months ago)
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Sifra
=====A wrapper around pycrypto RSA public key encryption. *Sifra* means *cipher* in
Czech.```python
from sifra import Sifra
s = Sifra(public_key_path='id_rsa.pub', private_key_path='id_rsa', b64=True)
text = 'super secret text'
data = s.encrypt(text)
print s.decrypt(data)s.encrypt_file('test')
s.decrypt_file('test')
```For both the private and public keys, you can pass it in as a string or as a
path to the key. By default all encryption is base64 encoded.License
-------BSD, of course...