summaryrefslogtreecommitdiff
path: root/www/scripts
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2018-06-25 15:04:16 +0000
committerIan C <ianc@noddybox.co.uk>2018-06-25 15:04:16 +0000
commita54dd4e961816a13054a6f561418908e13c64b5a (patch)
tree4554c8ba5c99ff850ad26013de1873beb8246dcb /www/scripts
parentdb675a214185996b3334acf81ac5ea7e3e9ff43b (diff)
Basic HTML framework and created initial JavaScript.
Diffstat (limited to 'www/scripts')
-rw-r--r--www/scripts/main.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/www/scripts/main.js b/www/scripts/main.js
new file mode 100644
index 0000000..e3c1f7b
--- /dev/null
+++ b/www/scripts/main.js
@@ -0,0 +1,16 @@
+
+function AESEncrypt(source, phrase)
+{
+ var encryptedAES = CryptoJS.AES.encrypt(source, phrase);
+
+ return encryptedAES.toString();
+}
+
+function AESDecrypt(source, phrase)
+{
+ var decryptedBytes = CryptoJS.AES.decrypt(source, phrase);
+
+ return decryptedBytes.toString(CryptoJS.enc.Latin1);
+}
+
+// vim: sw=4 ts=4