https://github.com/euthor/node-fpe-ascii
Format-preserving symmetric encryption on ASCII characters
https://github.com/euthor/node-fpe-ascii
encryption format-preserving-encryption javascript
Last synced: 10 months ago
JSON representation
Format-preserving symmetric encryption on ASCII characters
- Host: GitHub
- URL: https://github.com/euthor/node-fpe-ascii
- Owner: Euthor
- License: mit
- Created: 2017-06-12T13:06:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T07:41:09.000Z (over 8 years ago)
- Last Synced: 2025-08-09T12:12:00.320Z (11 months ago)
- Topics: encryption, format-preserving-encryption, javascript
- Language: JavaScript
- Size: 22.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/Euthor/node-fpe-ascii)
[](https://github.com/sindresorhus/xo)
# node-fpe-ascii
Format-Preserving symmetric encryption in Node.js.
Simply wraps [node-fpe][1], adding default support for all [ASCII][2] characters.
## Usage
```javascript
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'
```
## Run the tests
```bash
$ npm test
```
## Contributing?
```bash
# Always run the linter & fix code style before pushing
$ npm run lint
```
## Authors
- Nicholas Kyriakides, [@nicholaswmin][3]
## Owners
- [Euthor][4]
## License
> The MIT License
[1]: https://www.npmjs.com/package/node-fpe
[2]: http://ee.hawaii.edu/~tep/EE160/Book/chap4/subsection2.1.1.1.html
[3]: https://github.com/nicholaswmin
[4]: https://github.com/Euthor