Skip to content

[Replacement]: randomfill #706

@gameroman

Description

@gameroman

Package to replace

randomfill

Suggested replacement(s)

// in node
crypto.randomFill(buffer)

// in browser
function randomFill(buffer) {
  const view = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength)
  window.crypto.getRandomValues(view)
  return buffer
}

Manifest type

native (replaceable by a built-in platform feature)

Rationale

native

Availability

No response

Code example (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions