formcycle 8.3.6 - JavaScript for forms
    Preparing search index...

    Interface IncrementalHash<T>

    Builder for a hash or checksum. You can add data as it arrives, then obtain the final checksum when all the data was processed. This avoids having to read the data into memory all at once.

    interface IncrementalHash<T> {
        append: (data: T) => void;
        finish: () => string;
    }

    Type Parameters

    • T
    Index

    Properties

    Properties

    append: (data: T) => void

    Includes the given data in the checksum calculation.

    Type declaration

      • (data: T): void
      • Parameters

        • data: T

          Additional data to add to the checksum computation.

        Returns void

    finish: () => string

    Computes the final checksum based on all the data that was processed up until this point.

    Type declaration

      • (): string
      • Returns string

        The final computed checksum.