Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 418 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 418 Bytes

A pure PHP implementation of Format-preserving, Feistel-based encryption (FFX).

Ported from emulbreh/pyffx.

Usage

$key = 'hello';
$alphabet = 'abcdefghijklmnopqrstuvwxyz';

$ffx = new \Katoni\FFX\Codecs\Text($key, $alphabet, 10);
$ffx->encrypt('encryption'); // string: jrsunxgmbq

$ffx = new \Katoni\FFX\Codecs\Integer($key, 4);
$ffx->encrypt('1234'); // int: 1867