mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
15 lines
682 B
JavaScript
Executable File
15 lines
682 B
JavaScript
Executable File
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));
|