get-random-values icon indicating copy to clipboard operation
get-random-values copied to clipboard

Buffer type check has scoping issues

Open palant opened this issue 7 years ago • 0 comments

I tried using this module and hit the "expected Uint8Array" exception. Problem seems to be that the caller is running in a sandbox (via vm module), so its Uint8Array class is coming from a different scope. It might be better to test for buf.BYTES_PER_ELEMENT == 1.

palant avatar Aug 18 '16 16:08 palant