// app.vue
import { randomBytes } from 'crypto'
const rand = randomBytes(32)
for(const num of rand) {
console.log(num)
}
Describe the bug
Uint8Array.slice in the following line does not update the bytes buffer, use subArray instead as changes to the new array will update the original array.
Environment
"unenv": 1.9.0 node: v20.11.0
Reproduction
Polyfill a Nuxt app using
Describe the bug
Uint8Array.slice in the following line does not update the bytes buffer, use subArray instead as changes to the new array will update the original array.
https://github.com/unjs/unenv/blob/main/src/runtime/node/crypto/internal/node.ts#L44
Additional context
No response
Logs
No response