Class FileEntry

A file entry.

Hierarchy

Implements

  • FileEntryData

Constructors

Properties

data?: Uint8Array
executable?: boolean
integrity?: {
    algorithm: "SHA256";
    blockSize: number;
    blocks: string[];
    hash: string;
}

Type declaration

  • algorithm: "SHA256"
  • blockSize: number
  • blocks: string[]
  • hash: string
offset: string
size: number

Accessors

  • get offsetAsNumber(): number
  • The file's offset as specified in the ASAR header, but as a number instead of a string.

    Returns number

Methods

  • Calculates the integrity of this file's data.

    Returns undefined | {
        algorithm: "SHA256";
        blockSize: number;
        blocks: string[];
        hash: string;
    }

    The integrity of the given file data, in the same format as the integrity property of FileEntryData.

  • Gets the offset of the file's data in the ASAR archive.

    Parameters

    • headerSize: number

      The size of the ASAR header.

    Returns number

  • Calculates the integrity of the given file data.

    Parameters

    • data: undefined | Uint8Array

      The file data to calculate the integrity of.

    Returns undefined | {
        algorithm: "SHA256";
        blockSize: number;
        blocks: string[];
        hash: string;
    }

    The integrity of the given file data, in the same format as the integrity property of FileEntryData.

  • Checks wether the given value is an entry.

    Parameters

    • entry: unknown

      The value to check.

    Returns entry is Entry

Generated using TypeDoc