Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Base interface for various Sha hash implementations

    interface ISha {
        append(
            input: string | ArrayBuffer | ArrayBufferView<ArrayBufferLike>,
        ): void;
        digestToHex(): string;
        digestToUint32Array(): Uint32Array;
        digestToUint8Array(): Uint8Array;
        reset(): void;
    }

    Implemented by

    Methods

    • Append data to this instance, updating the hash. You can pass an ArrayBuffer, any of the TypedArrays (for example Uint8Array), a DataView or a string.

      When passing a string, the string is first UTF-8 encoded to an Uint8Array.

      Parameters

      • input: string | ArrayBuffer | ArrayBufferView<ArrayBufferLike>

      Returns void

      Error if any of the digest*() methods have been called before calling this method.

    • Return the hash as a lowercase hex string.

      Returns string

    • Return the hash value as an array of 32-bit unsigned int words.

      Returns Uint32Array

    • Returns the hash value as an array of bytes where each 32-bit word in the hash is output in big-endian order, i.e. the most significant byte first.

      Returns Uint8Array

    • Resets the hash and "forgets" any data that has been appended. The instance behaves as if it were a new instance.

      Returns void