Remove bcrypto from tests

This commit is contained in:
Matija Petrunic
2020-04-06 20:12:23 +02:00
parent 3866d8a077
commit 07213345ef
2 changed files with 18 additions and 21 deletions

View File

@ -3,8 +3,8 @@ import DuplexPair from 'it-pair/duplex';
import {Noise} from "../src";
import {createPeerIdsFromFixtures} from "./fixtures/peer";
import Wrap from "it-pb-rpc";
import {random} from "bcrypto";
import sinon from "sinon";
import crypto from 'crypto';
import {XXHandshake} from "../src/handshake-xx";
import {createHandshakePayload, generateKeypair, getHandshakePayload, getPayload, signPayload} from "../src/utils";
import {decode0, decode2, encode1, uint16BEDecode, uint16BEEncode} from "../src/encoder";
@ -122,7 +122,7 @@ describe("Noise", () => {
const wrappedInbound = Wrap(inbound.conn);
const wrappedOutbound = Wrap(outbound.conn);
const largePlaintext = random.randomBytes(100000);
const largePlaintext = crypto.randomBytes(100000);
wrappedOutbound.writeLP(largePlaintext);
const response = await wrappedInbound.read(100000);