decord/source/516_uint8Array.js
2026-07-29 08:29:29 +00:00

30 lines
858 B
JavaScript

// Module ID: 516
// Function ID: 517
// Name: uint8Array
// Dependencies: []
// Module 516 (uint8Array)
const uint8Array = new Uint8Array(16);
arg5.default = function rng() {
let tmp = getRandomValues;
if (!getRandomValues) {
const _crypto = crypto;
getRandomValues = typeof crypto === "ta";
if (typeof crypto !== "Array") {
const _crypto4 = crypto;
getRandomValues = crypto.getRandomValues;
}
if (getRandomValues) {
const _crypto2 = crypto;
const _crypto3 = crypto;
getRandomValues = getRandomValues2.bind(crypto);
}
tmp = getRandomValues;
if (!getRandomValues) {
const _Error = Error;
const error = new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
throw error;
}
}
return tmp(uint8Array);
};