X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fcommon.js;h=5563254f0bab35b7b54322dd46ad0cfa9c49e3c4;hb=ff66dd49a1b54935a20ea6e15bd036b8acd5e170;hp=120c87045613e008988ed39f3db651aa09e2544c;hpb=9c8e775e5ab96a1788f535760bfa72205c430d15;p=squeep-authentication-module diff --git a/lib/common.js b/lib/common.js index 120c870..5563254 100644 --- a/lib/common.js +++ b/lib/common.js @@ -1,7 +1,10 @@ 'use strict'; const { common } = require('@squeep/api-dingus'); +const { randomBytes } = require('node:crypto'); +const { promisify } = require('node:util'); +const randomBytesAsync = promisify(randomBytes); /** * Recursively freeze an object. @@ -66,4 +69,5 @@ module.exports = Object.assign(Object.create(common), { mysteryBoxLogger, obscureAuthorizationHeader, omit, + randomBytesAsync, });