mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2025-01-14 21:07:26 -08:00
74eb5fa045
- `example/proxy` is new folder for `example_proxy`. - `riven` is new folder for the main riven lib. - Updated metadata to be an array and include HTTP method.
14 lines
682 B
JavaScript
14 lines
682 B
JavaScript
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));
|