UNPKG

unreal.js

Version:

A pak reader for games like VALORANT & Fortnite written in Node.JS

30 lines (29 loc) 1.25 kB
/// <reference types="node" /> /// <reference types="ref-napi" /> import { AbstractVfsReader } from "./AbstractVfsReader"; import { VersionContainer } from "../versions/VersionContainer"; import { FGuid } from "../objects/core/misc/Guid"; export declare abstract class AbstractAesVfsReader extends AbstractVfsReader { protected constructor(path: string, versions: VersionContainer); abstract get encryptionKeyGuid(): FGuid; length: number; customEncryption?: CustomEncryption; aesKey?: Buffer; abstract get isEncrypted(): boolean; encryptedFileCount: number; abstract indexCheckBytes(): Buffer; /** * Test all keys from a collection and return the working one if there is one */ testAesKeys(keys: Iterable<Buffer>): Buffer | null; /** * Test all keys from a collection and return the working one if there is one */ testAesKeysStr(keys: Iterable<string>): string | null; testAesKey(key: Buffer): boolean; testAesKeyStr(key: string): boolean; static testAesKey(bytes: Buffer, key: Buffer): boolean; } export interface CustomEncryption { decryptData(contents: Buffer, offBytes: number, numBytes: number, reader: AbstractAesVfsReader): any; }