Function sha256

  • Compute a SHA-256 digest for a given byte array.

    Uses the native crypto implementation and falls back to noble.

    Returns

    The SHA-256 hash as a byte array.

    Parameters

    • bytes: Uint8Array

      A byte array.

    Returns Promise<Uint8Array>