Skip to main content

flutter_file_hash 0.0.6 copy "flutter_file_hash: ^0.0.6" to clipboard
flutter_file_hash: ^0.0.6 copied to clipboard

Native Flutter file and string hashing powered by Zig, with SHA, MD5, HMAC, BLAKE3, XXH3, cancellation, mmap, and Android content:// support.

Releases #

0.0.6 #

Changed #

  • Updated the bundled Zig core to zig-files-hash v0.0.8 / Zig 0.17.1.
  • Removed the Apple static-library repacking workaround now that Zig emits correctly aligned Mach-O archives (ziglang/zig#35984).
  • Updated the Zig CI version and platform build scripts for the new core version. C ABI remains v4.
  • Adapted the iOS Simulator build hook to Flutter 3.50's stricter native asset validation by extracting the requested architecture from the universal Zig dylib.

Example app #

  • Migrated the example app from Flutter's deprecated Material import to the standalone material_ui package recommended for Flutter 3.50.

CI / validation #

  • Added target-platform hash smoke tests for Android, iOS, macOS, Linux, and Windows. Each target verifies the reference SHA-256 digest through both stringHash and fileHash.

0.0.5 #

Changed #

  • Pin development to Flutter 3.47.5 and update the minimum SDK constraints for the current native-assets dependencies.
  • Use the pinned Flutter version in CI and verify the macOS Release build does not report inconsistent code asset framework names.
  • Upgrade code_assets, hooks, and ffigen; move test to the newest version compatible with the flutter_test SDK pin.
  • Raise the example app's macOS deployment target to 12.0 for Flutter 3.47.
  • Document how to compare this customized package with a freshly generated package_ffi template while preserving Android content:// support.

0.0.4 #

  • Hash Android content:// URIs through ContentResolver.openFileDescriptor and one zfh_fd_hash JNI call when the provider exposes an fd. Zig owns the read loop but never closes the descriptor; Kotlin closes it after hashing. Providers that expose only a stream retain the existing streaming fallback.
  • Add fileHash(..., useMmap: true) for stable regular local files. mmap stays disabled by default and is ignored for Android content:// descriptors.
  • Update the bundled zig-files-hash core to v0.0.7 and C ABI v4, and rebuild the native prebuilt matrix for the new ABI.
  • Document fd ownership, cancellation, stream fallback, and mmap constraints.

0.0.3 #

  • Keep iOS and macOS XCFramework headers limited to the public C API headers so Zig source files, tests, and internals are not bundled in published native artifacts.
  • Add per-platform prebuilt artifact checks to CI after each native build.
  • Strengthen prebuilt validation for CI and pub.dev publishing by rejecting unexpected Zig source/test files inside generated prebuilts.
  • Update the bundled zig-files-hash core to v0.0.6, which fixes upstream Windows MSVC static C ABI linking by bundling Zig compiler-rt. This package's Windows artifacts use a different build path, so no Flutter Windows behavior change is expected from that upstream fix.

0.0.2 #

  • Add dartdoc comments for the public Dart API, including fileHash, stringHash, HashAlgorithm, HashOptions, cancellation types, and package exceptions.
  • Improve pub.dev score readiness by documenting the exported API surface.
  • Simplify README badges to match the React Native package style: package version and monthly downloads.
  • Align the pub.dev publishing workflow with tag-based GitHub Actions publishing.

0.0.1 #

  • Initial release of flutter_file_hash, a Flutter wrapper around the zig-files-hash native core.
  • Add fileHash for native file hashing on Android, iOS, macOS, Linux, and Windows, with support for filesystem paths, file:// URI strings, and Android content:// streams.
  • Add stringHash for UTF-8 strings and base64 payloads already in Dart memory.
  • Support SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256, MD5, SHA-1, HMAC variants, BLAKE3, keyed BLAKE3, and seeded XXH3-64.
  • Return lowercase hex digests and validate key/seed options before native calls.
  • Add cooperative cancellation for long-running file hashes.
  • Bundle prebuilt Zig native artifacts through Flutter FFI/native assets so app developers do not need a local Zig toolchain.
1
likes
160
points
132
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Native Flutter file and string hashing powered by Zig, with SHA, MD5, HMAC, BLAKE3, XXH3, cancellation, mmap, and Android content:// support.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

code_assets, ffi, flutter, hooks

More

Packages that depend on flutter_file_hash

Packages that implement flutter_file_hash