jsdom icon indicating copy to clipboard operation
jsdom copied to clipboard

Allow subclasses in `crypto.getRandomValues()`

Open sebamarynissen opened this issue 3 years ago • 0 comments

This PR fixes #3395, meaning that you can now pass subclasses of a TypedArray in crypto.getRandomValues().

This PR also checks if the webcrypto api is available in Node.js, and if so, uses that one. The webcrypto api is available in >15, so once jsdom drops support for Node 14, this can be the default implementation and no polyfilling is required anymore.

sebamarynissen avatar Jul 06 '22 10:07 sebamarynissen