Skip to main content

pure Python format preserving encryption

Project description

https://travis-ci.org/emulbreh/pyffx.svg?branch=master

pyffx

pyffx is a pure Python implementation of Format-preserving, Feistel-based encryption (FFX).

Only method 2 is implemented.

See also libffx

Usage

>>> import pyffx
>>> e = pyffx.Integer(b'secret-key', length=4)
>>> e.encrypt(1234)
6103
>>> e.decrypt(6103)
1234
>>> e = pyffx.String(b'secret-key', alphabet='abc', length=6)
>>> e.encrypt('aaabbb')
'acbacc'
>>> e.decrypt('acbacc')
'aaabbb'

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

pyffx-0.3.0.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file pyffx-0.3.0.tar.gz.

File metadata

  • Download URL: pyffx-0.3.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for pyffx-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9ec77202e2f30810b7743969aa28af1c70711e0893d9b7a0661c6d57cf922b12
MD5 e875d6b7053f738cb85b4fb25ea93d14
BLAKE2b-256 d30d5d171254579c1595f7fe7df25a566184dce241c991d2211aaf7ed530b5b6

See more details on using hashes here.

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