Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

randomFill() in node:crypto should takes also ArrayBuffer, TypedArray, DataView as buffer. #20634

Closed
honnip opened this issue Sep 22, 2023 · 0 comments · Fixed by #20637
Closed

Comments

@honnip
Copy link

honnip commented Sep 22, 2023

Steps to reproduce

import { randomFillSync } from "node:crypto";

const buffer = new ArrayBuffer(8);
randomFillSync(buffer); // Uncaught TypeError: The "target" argument must be an instance of Buffer or Uint8Array. Received an instance of ArrayBuffer

version

$ deno -V
deno 1.36.0

info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant