PHP 8.2.30
Preview: test.js Size: 682 B
//usr/lib/node_modules/npm/node_modules/ecc-jsbn/test.js

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));

Directory Contents

Dirs: 1 × Files: 5

Name Size Perms Modified Actions
lib DIR
- drwxr-xr-x 2024-03-03 22:36:29
Edit Download
1.79 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
1.05 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
1.54 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
402 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
682 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).