Function calculateSHA256

  • Universal SHA256 hash function that works in both Node.js and browser environments

    Parameters

    • data: ArrayBuffer | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

      The data to hash (Buffer, Uint8Array, or ArrayBuffer)

    Returns Promise<string>

    Promise resolving to hex-encoded hash string