diff --git a/lib/internal/crypto/random.js b/lib/internal/crypto/random.js index b4812d606c02fd..a30f8acdf27786 100644 --- a/lib/internal/crypto/random.js +++ b/lib/internal/crypto/random.js @@ -11,7 +11,7 @@ const { const { isArrayBufferView } = require('internal/util/types'); const { kMaxLength } = require('buffer'); -const kMaxUint32 = Math.pow(2, 32) - 1; +const kMaxUint32 = 2 ** 32 - 1; const kMaxPossibleLength = Math.min(kMaxLength, kMaxUint32); function assertOffset(offset, elementSize, length) {