aboutsummaryrefslogtreecommitdiffhomepage
path: root/TestEncryption.php
diff options
context:
space:
mode:
authormarvin-borner@live.com2018-04-12 19:21:00 +0200
committermarvin-borner@live.com2018-04-12 19:21:00 +0200
commitf79f7d062ad8dcf89116da8faba456c4519d3d2a (patch)
tree140b026ee64d8a1407de819a6dc0b79ecc40452c /TestEncryption.php
parent2a221f180ebf6f86e3709401804108fcda65184f (diff)
Finalized multilanguage support -- need to add text etc
Diffstat (limited to 'TestEncryption.php')
-rw-r--r--TestEncryption.php39
1 files changed, 0 insertions, 39 deletions
diff --git a/TestEncryption.php b/TestEncryption.php
deleted file mode 100644
index 097b727..0000000
--- a/TestEncryption.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
-</head>
-<body>
-
-
-
-<script src="assets/js/encryption.js"></script>
-<script>
- // The passphrase used to repeatably generate this RSA key.
- var PassPhrase = randomString(16);
- // The length of the RSA key, in bits.
- var Bits = 1024;
- var MattsRSAkey = cryptico.generateRSAKey(PassPhrase, Bits);
- var MattsPublicKeyString = cryptico.publicKeyString(MattsRSAkey);
-
- var PlainText = "Hello Bro";
- var EncryptionResult = cryptico.encrypt(PlainText, MattsPublicKeyString);
- console.log(EncryptionResult.cipher);
-
- function randomString(len, charSet) {
- charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- var randomString = '';
- for (var i = 0; i < len; i++) {
- var randomPoz = Math.floor(Math.random() * charSet.length);
- randomString += charSet.substring(randomPoz,randomPoz+1);
- }
- return randomString;
- }
-
-</script>
-</body>
-</html> \ No newline at end of file