ecency-mobile/src/utils/crypto.js
2020-03-23 06:26:43 +02:00

8 lines
237 B
JavaScript

import CryptoJS from 'crypto-js';
export const encryptKey = (key, data) => CryptoJS.AES.encrypt(key, data).toString();
export const decryptKey = (key, data) => {
return CryptoJS.AES.decrypt(key, data).toString(CryptoJS.enc.Utf8);
};