tahamajs/IE / Projects /front /patch-crypto.cjs
tahamajs's picture
download
raw
814 Bytes
const crypto = require('crypto');
if (!crypto.getRandomValues) {
crypto.getRandomValues = function (buffer) {
return crypto.randomFillSync(buffer);
};
}
if (crypto.webcrypto && !crypto.webcrypto.getRandomValues) {
crypto.webcrypto.getRandomValues = crypto.getRandomValues;
}
if (!globalThis.crypto) {
globalThis.crypto = crypto.webcrypto || crypto;
}
if (!globalThis.crypto.getRandomValues) {
globalThis.crypto.getRandomValues = crypto.getRandomValues;
}
try {
const dc = require('diagnostics_channel');
if (dc && !dc.tracingChannel) {
dc.tracingChannel = function () {
return {
start: () => {},
end: () => {},
async: () => {},
error: () => {},
tracePromise: (fn) => fn(),
traceCallback: (fn) => fn(),
};
};
}
} catch (e) {}

Xet Storage Details

Size:
814 Bytes
·
Xet hash:
72feee5f19c12a33bd634afd32396bf7bbca1184336705279dd75dabf616ec9e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.