Expand description
§flowscripter-io-cli-hash-native
Rust-backed sha256 hasher exposed via Bun FFI, for demonstrating a
zero-copy ChunkRef handoff outside of pluggable-io-framework itself.
init/update/final mirrors OpenSSL’s EVP_Digest* shape: update
is called once per chunk with a raw pointer into JS- or Rust-owned
memory, final copies out the (small, 32-byte) digest and frees the
context.
Structs§
- Hasher
Context - Opaque hashing context. Only ever accessed through the
hasher_*functions below - never dereferenced directly by callers.
Constants§
Functions§
- hasher_
final ⚠ - Finalizes the hash, copies the
DIGEST_LENGTH-byte digest into the caller-suppliedoutbuffer, and freesctx-ctxmust not be used again after this call. - hasher_
init - Allocates a new hashing context. Must be freed by a matching call to
hasher_final. - hasher_
update ⚠ - Feeds
lenbytes starting atdatainto the hash.datamay point into memory owned by either the JS heap (viabun:ffi’sptr()) or Rust-owned memory (e.g. a future Rust-backed source’sNativeChunk) - this function reads it in place either way, without copying.