From c53ca9363a94594543136981b5f163be3e7c667e Mon Sep 17 00:00:00 2001 From: Emil Bay Date: Mon, 30 Apr 2018 21:46:43 +0200 Subject: [PATCH] Update randombytes.js --- randombytes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/randombytes.js b/randombytes.js index c19a660..5bdb874 100644 --- a/randombytes.js +++ b/randombytes.js @@ -11,7 +11,7 @@ var randombytes = (function () { } function nodeBytes (out, n) { - out.set(crypto.randomBytes(n)) + new Uint8Array(out.buffer, 0, n).set(crypto.randomBytes(n)) } function noImpl () {