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 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