Skip to main content

Easily Encrypt and Decrypt Python and JSON Objects

Project description

objcrypt

easily encrypt and decrypt python object and JSON objects with AES CBC 32 Block Encryption

installation

pip install objcrypt

or

python3 setup.py install

usage

import objcrypt, json

crypter = objcrypt.Crypter('key', 'cbc')
dictionary = {
  'test': 'test value'
}
encrypted_dict = crypter.encrypt_object(dictionary)

# encrypted_dict now has encrypted values

json_dict = json.loads(dictionary)
enc_json = crypter.encrypt_json(json_dict)

# enc_json is now encrypted

dec_dict = crypter.decrypt_object(encrypted_dict)

# decoded now

dec_json = crypter.decrypt_json(enc_json)

# decoded json object now

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

objcrypt-0.6.tar.gz (1.9 kB view hashes)

Uploaded Source

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