ecency-mobile/src/utils/crypto.js

7 lines
225 B
JavaScript
Raw Normal View History

import CryptoJS from 'crypto-js';
2018-10-22 01:42:12 +03:00
export const encryptKey = (key, data) => CryptoJS.AES.encrypt(key, data).toString();
2019-05-25 13:37:38 +03:00
export const decryptKey = (key, data) =>
CryptoJS.AES.decrypt(key, data).toString(CryptoJS.enc.Utf8);