Fix test util import

This commit is contained in:
dapplion 2020-11-25 15:11:02 +00:00
parent 847ec46ac9
commit 4cb49674d5
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import {getRandomBytes} from "../src/helpers/utils"; import crypto from "crypto";
export function fromHexString(hex: string): Buffer { export function fromHexString(hex: string): Buffer {
return Buffer.from(hex.replace("0x", ""), "hex"); return Buffer.from(hex.replace("0x", ""), "hex");
@ -9,7 +9,7 @@ export function toHexString(bytes: Buffer | Uint8Array): string {
} }
export function randomMessage(): Uint8Array { export function randomMessage(): Uint8Array {
return getRandomBytes(32); return crypto.randomBytes(32);
} }
export function getN<T>(n: number, getter: () => T): T[] { export function getN<T>(n: number, getter: () => T): T[] {