Skip to main content

Crypto utilities

Project description

# Rho-Crypto

Basic cryptographic utilties for common tasks.

## AES Cipher

Utility class for encrypting and decrypting a string.

Sample use:

from rho_crypto.aes import AESCipher

AES_SECRET_KEY = os.environ.get(‘AES_SECRET_KEY’, None) cipher = AESCipher(AES_SECRET_KEY)

# Encrypt a password cipher.encrypt(‘plaintext-password’).decode(‘utf-8’)

# Decrypt a password cipher.decrypt(‘encrypted-password’)

## Hashing

Create consistent SHA1 hash of a file.

Sample use:

from rho_crypto.hashing import Hasher

my_hasher = Hasher() sha1_hash_val = my_hasher.hash_from_path(‘tests/fixtures/test-file.txt’, ‘SHA1’)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rho-crypto-0.5.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

rho_crypto-0.5.2-py2.py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page