@flowscripter/flowscripter-io-cli-hash-native
    Preparing search index...

    Class Sha256Hasher

    Incremental sha256 hasher backed by a Rust cdylib via bun:ffi.

    update() passes a raw pointer into the caller's buffer straight to the synchronous Rust FFI call - a zero-copy handoff for a JS-owned Uint8Array, or a pure pointer passthrough for an already Rust-owned buffer (updatePointer()).

    Index
    • Finalizes the hash and returns the digest. The hasher cannot be reused after this.

      Returns Uint8Array

    • Feed a JS-owned buffer into the hash - zero-copy via bun:ffi's ptr().

      Parameters

      • data: Uint8Array

      Returns void

    • Feed a chunk already referenced by a raw pointer/length (e.g. a Rust-owned NativeChunk) into the hash - no copy at all, not even the ptr() lookup update() needs for a JS-owned buffer.

      Parameters

      • dataPtr: number
      • length: number

      Returns void