UNPKG

@nopwdio/sdk-js

Version:
11 lines 370 B
import { arrayTo64 } from "./encoding.js"; export const generateRandom = function (numBytes) { const array = new Uint8Array(numBytes); window.crypto.getRandomValues(array); return array; }; export const generateRandomString = function (numBytes) { const array = generateRandom(numBytes); return arrayTo64(array); }; //# sourceMappingURL=random.js.map