BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / ecc-jsbn / test.js

test.js

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
test.js 682 B Download Raw
1var ecc = require("./index.js");
2var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1);
3var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1);
4console.log(key1.deriveSharedSecret(key2));
5var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey);
6var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true);
7console.log(key3.deriveSharedSecret(key4));
8
9var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1);
10var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1);
11console.log(key1.deriveSharedSecret(key2));
12var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey);
13var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true);
14console.log(key3.deriveSharedSecret(key4));