Metadata-Version: 2.1
Name: rho-crypto
Version: 0.5.2
Summary: Crypto utilities
Home-page: https://gitlab.com/sermos/rho-crypto
Maintainer: Rho Impact
License: Commercial
Platform: UNKNOWN
Requires-Dist: pycryptodome (>=3.16.0)
Provides-Extra: deploy
Requires-Dist: Cython (<0.30,>=0.29) ; extra == 'deploy'
Requires-Dist: wheel (<0.33,>=0.32) ; extra == 'deploy'
Requires-Dist: twine (<2,>=1.12) ; extra == 'deploy'
Provides-Extra: test
Requires-Dist: coverage (==4.0a5) ; extra == 'test'
Requires-Dist: mock (<2,>=1) ; extra == 'test'
Requires-Dist: pytest (<5,>=4) ; extra == 'test'
Requires-Dist: tox (<4,>=3) ; extra == 'test'

# 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')


