You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the new Node.js 15.0.0 the use of Buffer.allocUnsafe gives a zero-filled Buffer, like with Buffer.alloc.
This kind of Buffer can be filled will buf.fill or manipulated by buf.writeUInt8. But it cannot be filled with crypto.randomFillSync(buf). If this is tried, the Buffer keeps its previously content.
By using asynchronous randomFill or still the Sync-one but with Buffer.alloc this problem does not appear.
In the new Node.js 15.0.0 the use of
Buffer.allocUnsafe
gives a zero-filled Buffer, like withBuffer.alloc
.This kind of Buffer can be filled will
buf.fill
or manipulated bybuf.writeUInt8
. But it cannot be filled withcrypto.randomFillSync(buf)
. If this is tried, the Buffer keeps its previously content.By using asynchronous
randomFill
or still the Sync-one but withBuffer.alloc
this problem does not appear.The text was updated successfully, but these errors were encountered: