Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

IChecksumSupport Interface

This interface is implemented by a global Checksum Support Object.

Declaration

interface Checksum.IChecksumSupport {

    // Methods
    ${isChecked}(algorithmId: string): boolean;
    ${checkAlgorithm}(algorithmId: string, checked?: boolean): void;
    ${checkAll}(checked: boolean): void;
    ${calculateAsync}(document: ${IDocument}, algorithms?: (string | ${Checksum.CustomCRC} | ${Checksum.CustomFNV})[], range?: ${ISelection}): Promise<${Checksum.Result}[]>;
    ${calculateAsync#calculateAsync1}(document: ${IDocument}, algorithm: string | ${Checksum.CustomCRC} | ${Checksum.CustomFNV}, range?: ${ISelection}): Promise<${Checksum.Result}[]>;
    ${getResult}(document: ${IDocument}, algorithmId: string): ${Checksum.Result};
}
// This interface is not available in managed environment
// This interface is not available in native environment

Checksum.IChecksumSupport Methods

isChecked

isChecked(algorithmId: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
algorithmId
Algorithm ID. Must be one of the Checksum constants.

Check if a given algorithm is enabled.

checkAlgorithm

checkAlgorithm(algorithmId: string, checked?: boolean): void;
// This method is not available in managed environment
// This method is not available in native environment
algorithmId
Algorithm ID. Must be one of the Checksum constants.
checked
True to enable algorithm, false to disable, or omit to toggle current state.

Enable, disable or toggle a given checksum algorithm.

checkAll

checkAll(checked: boolean): void;
// This method is not available in managed environment
// This method is not available in native environment
checked
True to enable all algorithms, false to disable all algorithms.

Enable or disable all checksum algorithms.

calculateAsync

calculateAsync(document: ${IDocument}, algorithms?: (string | ${Checksum.CustomCRC} | ${Checksum.CustomFNV})[], range?: ${ISelection}): Promise<${Checksum.Result}[]>;
// This method is not available in managed environment
// This method is not available in native environment
document
Document to calculate checksums/hashes for.
algorithms
An array of algorithm IDs or custom algorithm parameter objects. If specified empty array or parameter omitted, all algorithms which are currently enabled in UI are calculated.
range
Optional multiple selection object to calculate checksums/hashes for. If omitted, the whole document is used.

A promise that resolves to an array of Result objects, each for one of requested algorithms.

Calculate checksums/hashes asynchronously.

calculateAsync

calculateAsync(document: ${IDocument}, algorithm: string | ${Checksum.CustomCRC} | ${Checksum.CustomFNV}, range?: ${ISelection}): Promise<${Checksum.Result}[]>;
// This method is not available in managed environment
// This method is not available in native environment
document
Document to calculate checksum/hash for.
algorithm
Algorithm ID or custom algorithm parameter object.
range
Optional multiple selection object to calculate checksums/hashes for. If omitted, the whole document is used.

Calculate single checksum/hash asynchronously.

getResult

getResult(document: ${IDocument}, algorithmId: string): ${Checksum.Result};
// This method is not available in managed environment
// This method is not available in native environment
document
Document to get the result for.
algorithmId
Algorithm ID. Must be one of the Checksum constants.

Get previously calculated checksum/hash result.