PeculiarVentures / webcrypto-core

A input validation layer for WebCrypto polyfills.
MIT License
28 stars 13 forks source link

getRandomValues() requires process #35

Closed Javarome closed 3 years ago

Javarome commented 3 years ago

When running a test (i.e. using NodeJS) that calls peculiar's crypto.getRandomValues(new Int8Array(12)) everything works fine.

When running the same code in the browser (still using peculiar's crypto and NOT window.crypto), I get

ReferenceError: process is not defined

I would have expected that an API of a WebCrypto implementation to run on the web (without requiring NodeJS modules such as process)?

microshine commented 3 years ago

Could you share an example and modules you use? Cause webcrypto-core doesn't implement Crypto::getRandomValues

Javarome commented 3 years ago

You are correct: I was using a webpack fallback to crypto-browserify to which you delegated as the "default" implementation for random values.

Sorry about the false warning.