PHP 8.2.30
Preview: test.js Size: 682 B
/opt/alt/alt-nodejs12/root/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 2026-03-19 07:09:41
Edit Download
1.79 KB lrwxr-xr-x 2026-03-09 07:21:31
Edit Download
1.05 KB lrwxr-xr-x 2026-03-09 07:21:31
Edit Download
1.54 KB lrwxr-xr-x 2026-03-09 07:21:31
Edit Download
402 B lrwxr-xr-x 2026-03-09 07:21:31
Edit Download
682 B lrwxr-xr-x 2026-03-09 07:21:31
Edit Download

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