Skip to content

Commit

Permalink
fix for cjs import
Browse files Browse the repository at this point in the history
  • Loading branch information
jplomas committed Mar 3, 2023
1 parent c0938bd commit 7fd34b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/dilithium5/src/sign.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { randomBytes } from 'randombytes'; // eslint-disable-line import/no-extraneous-dependencies
import pkg from 'randombytes'; // eslint-disable-line import/no-extraneous-dependencies
import { SHAKE } from 'sha3'; // eslint-disable-line import/no-extraneous-dependencies

import {
Expand Down Expand Up @@ -47,6 +47,8 @@ import {
import { Poly, polyChallenge, polyNTT } from './poly.js';
import { packPk, packSig, packSk, unpackPk, unpackSig, unpackSk } from './packing.js';

const { randomBytes } = pkg;

export function cryptoSignKeypair(passedSeed, pk, sk) {
try {
if (pk.length !== CryptoPublicKeyBytes) {
Expand Down

0 comments on commit 7fd34b5

Please sign in to comment.