Adding filter bar
[aai/sparky-fe.git] / src / utils / Crypto.js
1 /**
2  * Created by salmaat on 7/13/2017.
3  */
4 import CryptoJS from 'crypto-js';
5
6 var key = 'key2017';
7
8 function encrypt(text) {
9   var encrypted = CryptoJS.AES.encrypt(text, key);
10   return encrypted.toString().split('/').join('*');
11 }
12
13 function decrypt(text) {
14   var decrypted = CryptoJS.AES.decrypt(text.split('*').join('/'), key);
15   return decrypted.toString(CryptoJS.enc.Utf8);
16 }
17
18
19 module.exports = {
20   encrypt: encrypt,
21   decrypt: decrypt
22 };

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use