pure Python format preserving encryption
Project description
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
Release history Release notifications | RSS feed
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)
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ec77202e2f30810b7743969aa28af1c70711e0893d9b7a0661c6d57cf922b12 |
|
MD5 | e875d6b7053f738cb85b4fb25ea93d14 |
|
BLAKE2b-256 | d30d5d171254579c1595f7fe7df25a566184dce241c991d2211aaf7ed530b5b6 |