https://github.com/abhayagiri/raho
Python module for simple symmetric encryption built on cryptography
https://github.com/abhayagiri/raho
cryptography fernet python python2 python3
Last synced: about 1 year ago
JSON representation
Python module for simple symmetric encryption built on cryptography
- Host: GitHub
- URL: https://github.com/abhayagiri/raho
- Owner: abhayagiri
- License: isc
- Created: 2019-09-22T01:49:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-23T03:13:40.000Z (over 6 years ago)
- Last Synced: 2025-03-03T01:08:17.003Z (over 1 year ago)
- Topics: cryptography, fernet, python, python2, python3
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `raho`: Simple symmetric encryption
[](https://travis-ci.org/abhayagiri/raho)
[](https://codecov.io/gh/abhayagiri/raho)
[](https://pypi.org/project/raho/)
[](https://pypi.org/project/raho/)
`raho` is a simplified wrapper library for the
[cryptography](https://cryptography.io/) module.
## Installation
```sh
pip install raho
```
And in your Python file:
```python
>>> import raho
```
## Usage
### With Fernets
```python
>>> fernet = raho.generate_fernet()
>>> message = raho.encrypt('he is hiding behind the rock', fernet)
>>> message
'Z0FB...'
>>> raho.decrypt(message, fernet)
'he is hiding behind the rock'
```
### With passwords
```python
>>> message = raho.encrypt_with_password('they know water', 'dragon123')
>>> raho.decrypt_with_password(message, 'dragon123')
'they know water'
```
### With key files
```python
>>> fernet = raho.generate_key_file('key-file')
>>> message = raho.encrypt_with_key_file('falcon flies at dawn', 'key-file')
>>> raho.decrypt_with_key_file(message, 'key-file')
'falcon flies at dawn'
```
### Command line
See `raho --help` for command-line usage examples.
## More information
- [Fernets and `cryptography`](https://cryptography.io/)
- [Development Documentation](https://github.com/abhayagiri/raho/blob/master/DEVELOPMENT.md)