Format-Preserving symmetric encryption in Node.js.
Simply wraps node-fpe, adding default support for all ASCII characters.
const Encryptor = require('node-fpe-ascii');
const encryptor = new Encryptor({ password: 'veronica' });
// Note: The ciphertext has the same length as the plaintext.
encryptor.encrypt('The quick brown fox number 3, jumps over the lazy dog')
// '/(26:*Gu`6OpRDx6>R,6x* O2p6oF6w* \b6Rt2p6C(26l7E56gR!'
encryptor.decrypt('/(26:*Gu`6OpRDx6>R,6x* O2p6oF6w* \b6Rt2p6C(26l7E56gR!')
// 'The quick brown fox number 3, jumps over the lazy dog'
$ npm test
# Always run the linter & fix code style before pushing
$ npm run lint
- Nicholas Kyriakides, @nicholaswmin
The MIT License