Create IK and read ephemeral keys

This commit is contained in:
Belma Gutlic
2020-01-03 17:28:13 +01:00
parent e797dc2741
commit a514ededa1
5 changed files with 58 additions and 14 deletions

View File

@ -61,7 +61,7 @@ describe("Noise", () => {
const xx = new XXHandshake();
const { privateKey: libp2pPrivKey, publicKey: libp2pPubKey } = getKeyPairFromPeerId(remotePeer);
const handshake = new Handshake(false, libp2pPrivKey, libp2pPubKey, prologue, staticKeys, wrapped, localPeer, xx);
const handshake = new Handshake(false, libp2pPrivKey, libp2pPubKey, prologue, staticKeys, wrapped, localPeer, undefined, xx);
let receivedMessageBuffer = decodeMessageBuffer((await wrapped.readLP()).slice());
// The first handshake message contains the initiator's ephemeral public key