summaryrefslogtreecommitdiff
path: root/includes/external/school/node_modules/node-forge/tests/keygen.html
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-23 19:34:56 +0100
committerMinteck <contact@minteck.org>2023-02-23 19:34:56 +0100
commit3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch)
tree75be5fba4368472fb11c8015aee026b2b9a71888 /includes/external/school/node_modules/node-forge/tests/keygen.html
parent8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff)
downloadpluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz
pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2
pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'includes/external/school/node_modules/node-forge/tests/keygen.html')
-rw-r--r--includes/external/school/node_modules/node-forge/tests/keygen.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/includes/external/school/node_modules/node-forge/tests/keygen.html b/includes/external/school/node_modules/node-forge/tests/keygen.html
new file mode 100644
index 0000000..22e2432
--- /dev/null
+++ b/includes/external/school/node_modules/node-forge/tests/keygen.html
@@ -0,0 +1,56 @@
+<!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>