decord/source/modules/rtc/hooks/useReadableSecureFramesFingerprint.tsx

55 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9754
// Function ID: 9755
2026-07-20 16:05:17 +00:00
// Name: useReadableSecureFramesFingerprint
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 206, 9732, 2]
2026-07-20 16:05:17 +00:00
// Exports: useReadableSecureFramesFingerprint
2026-08-24 06:08:38 +00:00
// Module 9754 (useReadableSecureFramesFingerprint)
import closure_3 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("set").fileFinishedImporting("modules/rtc/hooks/useReadableSecureFramesFingerprint.tsx");
2026-07-20 16:05:17 +00:00
export const useReadableSecureFramesFingerprint = function useReadableSecureFramesFingerprint(fingerprintBase64) {
fingerprintBase64 = fingerprintBase64.fingerprintBase64;
const chunkSize = fingerprintBase64.chunkSize;
const desiredLength = fingerprintBase64.desiredLength;
const items = [chunkSize, fingerprintBase64, desiredLength];
const memo = React.useMemo(() => {
if (null != fingerprintBase64) {
2026-07-29 08:29:29 +00:00
if ("" !== tmp) {
2026-07-20 16:05:17 +00:00
const obj = chunkSize(desiredLength[1]);
2026-07-29 08:29:29 +00:00
const toByteArrayResult = chunkSize(desiredLength[1]).toByteArray(tmp);
2026-07-20 16:05:17 +00:00
const str5 = fingerprintBase64(desiredLength[2]).generateDisplayableCode(toByteArrayResult, desiredLength, chunkSize);
if (null == str5) {
return null;
} else {
const _RegExp = RegExp;
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
const regExp = new RegExp(".{1," + tmp14 + "}", "g");
2026-07-20 16:05:17 +00:00
const match = str5.match(regExp);
let arr = null;
if (null != match) {
const _Array = Array;
arr = Array.from(match);
}
return arr;
}
const obj2 = fingerprintBase64(desiredLength[2]);
2026-07-29 08:29:29 +00:00
tmp14 = chunkSize;
2026-07-20 16:05:17 +00:00
}
}
return null;
}, items);
if (null != fingerprintBase64) {
if ("" !== fingerprintBase64) {
if (null == memo) {
const _Error = Error;
2026-08-24 06:08:38 +00:00
error = new Error("[useReadableSecureFramesCode] Failed to parse base 64 code.");
2026-07-20 16:05:17 +00:00
throw error;
}
}
}
return memo;
};