summaryrefslogtreecommitdiff
path: root/lib/internal/crypto/random.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/crypto/random.js')
-rw-r--r--lib/internal/crypto/random.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/internal/crypto/random.js b/lib/internal/crypto/random.js
index a30f8acdf2..15fbc37c22 100644
--- a/lib/internal/crypto/random.js
+++ b/lib/internal/crypto/random.js
@@ -1,7 +1,7 @@
'use strict';
const { AsyncWrap, Providers } = process.binding('async_wrap');
-const { Buffer } = require('buffer');
+const { Buffer, kMaxLength } = require('buffer');
const { randomBytes: _randomBytes } = process.binding('crypto');
const {
ERR_INVALID_ARG_TYPE,
@@ -10,7 +10,6 @@ const {
} = require('internal/errors').codes;
const { isArrayBufferView } = require('internal/util/types');
-const { kMaxLength } = require('buffer');
const kMaxUint32 = 2 ** 32 - 1;
const kMaxPossibleLength = Math.min(kMaxLength, kMaxUint32);