rsa-oaep-encryption
    Preparing search index...

    Interface HashAlgorithm

    A hash algorithm instance that can compute message digests.

    import { sha256 } from 'rsa-oaep-encryption';

    const hash = sha256.create();
    hash.update('Hello, World!');
    const digest = hash.digest();
    console.log(digest.toHex());
    interface HashAlgorithm {
        algorithm: string;
        blockLength: number;
        digestLength: number;
        messageLength: number;
        digest(): ByteStringBuffer;
        start(): this;
        update(msg: string): this;
    }
    Index

    Properties

    algorithm: string

    The algorithm name (e.g., 'sha256', 'sha512').

    blockLength: number

    The block size in bytes used by the algorithm.

    digestLength: number

    The output digest size in bytes.

    messageLength: number

    The current message length in bytes being processed.

    Methods

    • Resets the hash state to begin a new digest computation.

      Returns this

      This hash instance for method chaining.

    • Updates the hash with additional message data.

      Parameters

      • msg: string

        The message string to add to the hash computation.

      Returns this

      This hash instance for method chaining.