Closed BoxenOfDonuts closed 1 year ago
Thanks. This looks good. We can also polyfill it (like this). Would you like to help on this in same PR?
Yes, I can give it a shot
Removed some guard rails, let me know if you want them back in.
Removed:
MAX_UINT32
as the internal Buffer will throw already. Size > 0
getRandomValues
since slicing longer than the TypedArray should just return the TypedArray
Added export of
randomBytes
to the crypto polyfill. If another dependency requires it currently, nitro will fail to build. Currently webcrypto does not have arandomBytes
method