va-tracker-middleware/src/helper/cryptrEncDec.js

17 lines
463 B
JavaScript

import Cryptr from "cryptr"
const cryptr = new Cryptr('fme-emf-06-2024-06-made-emf-easy-forms-forfmems-madfmee-efmeasy', { encoding: 'base64', pbkdf2Iterations: 10000, saltLength: 10 });
const encryptCryptr = (str) => {
const encryptedString = cryptr.encrypt(str);
return encryptedString;
}
const decryptCryptr = (str) => {
const decryptedString = cryptr.decrypt(str);
return decryptedString;
}
export {
encryptCryptr,
decryptCryptr
}