Skip to main content

ENCRYPT DECRYPT AES256

Project description

ENCRYPT DECRYPT AES 256bit


Install to your environment : > pip install python-aes256

How to use :

Test using python shell :
> python manage.py shell
> from pyaes256 import PyAES256
> a = PyAES256()
> password = 'g_7me8rl2m#a_h2oresgt2#ni=3_4*!ai*=rtsq)yi!g7_5-51'     

Encryption Process :
> enc = a.encrypt('Secret Text',password)
> print('Encrypt: ', enc)
    Encrypt: {'url': 'REhHcFNaN0tPSzVqNm50UUJ0T2g5dz09', 'salt': b'k4/Ai7zJKUssvup2c+2+3w==', 'iv': b'34YtC6XqlQjo8UfWc4yNcA=='}

Decryption Process :
> dec = a.decrypt(url='REhHcFNaN0tPSzVqNm50UUJ0T2g5dz09', salt=b'k4/Ai7zJKUssvup2c+2+3w==', iv=b'34YtC6XqlQjo8UfWc4yNcA==', password=password)
> print('Decrypt: ', dec)
    Decrypt: b'Secret Text'
> origin = bytes.decode(dec)
> print('Origin: ', origin)
    Origin: 'Secret Text'

Avalanche Effect :


How to use :

Test using python shell :
> python manage.py shell
> from pyavalanche import PyAvalanche

> chipper1 = 'Nk9iL05BQmM5bnRES3drVGc0NHZRdz09'
> chipper2 = 'Z3VFbi9lWDJtS1B5UzE4TGVsMzRHQT09'
> print('Chipper 1 = ', chipper1)
> print('Chipper 2 = ', chipper2)
> ava = PyAvalanche()
> result = ava.avalanche_effect(chipper1, chipper2)

Print result :
> print(result,'%')
    50.0 %
> print("If more than 50% output bits have changed then the algo have good avalanche effect.")

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

python-aes256-1.0.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

python_aes256-1.0.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file python-aes256-1.0.4.tar.gz.

File metadata

  • Download URL: python-aes256-1.0.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for python-aes256-1.0.4.tar.gz
Algorithm Hash digest
SHA256 90f2ef0b9e8891ca81786b6f9336d45004fb25d9f8836920dee2bbb511bf34e6
MD5 74fbb504a5768a1cd2db403ec5e68b61
BLAKE2b-256 a8742411d6df6d1a28cd8cc5e311cdee3c305a047ad3c6b7c285b784e3311b8b

See more details on using hashes here.

Provenance

File details

Details for the file python_aes256-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for python_aes256-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7874520f9c58c30878644774ff4dd8b85a0dcc9c0f933ca7260232a72c6a4e0c
MD5 e2eafe376010af6a9587a36728289cfa
BLAKE2b-256 b49eeed0995da25bda244ee61e6a238c3038912287e3cf8143913cc22dd8e5dc

See more details on using hashes here.

Provenance

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