This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 | |
11 | |
13 | |
15 | |
17 | |
19 | |
20 | |
21 | |
22 | |
23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script> | |
<script> | |
// used to obfuscate and encrypt the credentials | |
const saltCredentials = "jf02heg9u64a{%m<83#@;Pxrjg17uyr#@&*%^Y"; | |
// encode credentials before storing | |
function encodeCredentials(crds){ | |
// json object expected e.g. {'api-id':'K0xf56g', 'pwd':'Some.Pa$$w0rd'} | |
const crd = JSON.stringify(crds); |