Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
682 bytes
|
Line | |
---|
1 | var ecc = require("./index.js");
|
---|
2 | var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1);
|
---|
3 | var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1);
|
---|
4 | console.log(key1.deriveSharedSecret(key2));
|
---|
5 | var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey);
|
---|
6 | var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true);
|
---|
7 | console.log(key3.deriveSharedSecret(key4));
|
---|
8 |
|
---|
9 | var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1);
|
---|
10 | var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1);
|
---|
11 | console.log(key1.deriveSharedSecret(key2));
|
---|
12 | var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey);
|
---|
13 | var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true);
|
---|
14 | console.log(key3.deriveSharedSecret(key4));
|
---|
Note:
See
TracBrowser
for help on using the repository browser.