Answer the question
In order to leave comments, you need to log in
How to implement encryption in js?
Hello.
I need to encrypt/decrypt a number.
For example, this is: 7801703542
The output should be a number of the same length, for example: 004521787
Are there libraries ready for this?
Answer the question
In order to leave comments, you need to log in
Here is a search for the tag on github - https://github.com/topics/format-preserving-encryp...
If anything, this is Encryption that preserves the
node-fpe format
const fpe = require('node-fpe');
const cipher = fpe({ password: 'secret' });
cipher.encrypt('1234567');
// '4185730'
cipher.decrypt('4185730');
// '1234567'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question