summaryrefslogtreecommitdiff
path: root/node_modules/ecc-jsbn/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ecc-jsbn/test.js')
-rwxr-xr-xnode_modules/ecc-jsbn/test.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/ecc-jsbn/test.js b/node_modules/ecc-jsbn/test.js
new file mode 100755
index 0000000..bd52abf
--- /dev/null
+++ b/node_modules/ecc-jsbn/test.js
@@ -0,0 +1,14 @@
+var ecc = require("./index.js");
+var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1);
+var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1);
+console.log(key1.deriveSharedSecret(key2));
+var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey);
+var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true);
+console.log(key3.deriveSharedSecret(key4));
+
+var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1);
+var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1);
+console.log(key1.deriveSharedSecret(key2));
+var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey);
+var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true);
+console.log(key3.deriveSharedSecret(key4));