node-fpe-pattern

1.0.0 • Public • Published

node-fpe-pattern

Format-Preserving symmetric encryption in Node.js. Wraps node-fpe, adding support to preserve the pattern of the text.

Usage

const FPEncryptor = require('node-fpe-pattern');

const encryptor = new FPEncryptor({password: "secret",domain: ["O", "N", "E", "I", "S", "A", "L"]});

encryptor.encrypt("[ONE]+[IS]+[ALL],[ALL]+[IS]+[ONE]", ["[", "]", ",", "+"]);

// '[OLA]+[SE]+[NII],[NII]+[SE]+[OLA]'

encryptor.decrypt('[OLA]+[SE]+[NII],[NII]+[SE]+[OLA]', ["[", "]", ",", "+"]);

// '[ONE]+[IS]+[ALL],[ALL]+[IS]+[ONE]'

Readme

Keywords

Package Sidebar

Install

npm i node-fpe-pattern

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.95 kB

Total Files

4

Last publish

Collaborators

  • narengoku