summaryrefslogtreecommitdiff
path: root/alarm/node_modules/node-forge/tests/keygen.html
diff options
context:
space:
mode:
Diffstat (limited to 'alarm/node_modules/node-forge/tests/keygen.html')
-rw-r--r--alarm/node_modules/node-forge/tests/keygen.html56
1 files changed, 0 insertions, 56 deletions
diff --git a/alarm/node_modules/node-forge/tests/keygen.html b/alarm/node_modules/node-forge/tests/keygen.html
deleted file mode 100644
index 22e2432..0000000
--- a/alarm/node_modules/node-forge/tests/keygen.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <script type="text/javascript" src="forge/util.js"></script>
- <script type="text/javascript" src="forge/sha256.js"></script>
- <script type="text/javascript" src="forge/cipher.js"></script>
- <script type="text/javascript" src="forge/cipherModes.js"></script>
- <script type="text/javascript" src="forge/aes.js"></script>
- <script type="text/javascript" src="forge/prng.js"></script>
- <script type="text/javascript" src="forge/random.js"></script>
- <script type="text/javascript" src="forge/jsbn.js"></script>
- <script type="text/javascript" src="forge/asn1.js"></script>
- <script type="text/javascript" src="forge/pem.js"></script>
- <script type="text/javascript" src="forge/rsa.js"></script>
-</head>
-
-<body>
-
-<script type="text/javascript">
-
-function async() {
- var bits = 2048;
- console.log('Generating ' + bits + '-bit key-pair...');
- var st = +new Date();
- forge.pki.rsa.generateKeyPair({
- bits: bits,
- workers: -1,
- /*workLoad: 100,*/
- workerScript: 'forge/prime.worker.js'
- }, function(err, keypair) {
- var et = +new Date();
- console.log('Key-pair created in ' + (et - st) + 'ms.');
- //console.log('private', forge.pki.privateKeyToPem(keypair.privateKey));
- //console.log('public', forge.pki.publicKeyToPem(keypair.publicKey));
- });
-}
-
-function sync() {
- var bits = 2048;
- console.log('Generating ' + bits + '-bit key-pair...');
- var st = +new Date();
- var keypair = forge.pki.rsa.generateKeyPair(bits);
- var et = +new Date();
- console.log('Key-pair created in ' + (et - st) + 'ms.');
- //console.log('private', forge.pki.privateKeyToPem(keypair.privateKey));
- //console.log('public', forge.pki.publicKeyToPem(keypair.publicKey));
-}
-
-async();
-//sync();
-
-</script>
-
-</body>
-</html>