WIP
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
import AES from 'crypto-js/AES';
|
||||
import CryptoJS from 'crypto-js';
|
||||
|
||||
export const jjDecrypt = (encryptedText, key) => {
|
||||
const bytes = CryptoJS.AES.decrypt(encryptedText, key);
|
||||
const originalText = bytes.toString(CryptoJS.enc.Utf8);
|
||||
return originalText;
|
||||
};
|
||||
|
||||
|
||||
|
||||
export const jjEncrypt = (text, key) => {
|
||||
return AES.encrypt(text, key).toString();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user