blake3_ffi 1.0.2
blake3_ffi: ^1.0.2 copied to clipboard
BLAKE3 hashing for Dart over native FFI, up to 14x faster than SHA-256. One- shot, streaming, keyed (MAC), and key derivation. C auto-compiled at build, no binaries to ship.
1.0.2 #
- Add
example/README.mdfor pub.dev's Example tab (it was empty). It walks through the four things the package does — one-shot hash, streaming file hash, keyed MAC, key derivation — with the example's real output. Docs only.
1.0.1 #
- Fix the bulk benchmark's 1 MB row, which was a measurement artifact rather
than a real number.
bench/bench.darthashed a flat four iterations per size, so the 1 MB case timed only a few megabytes — too little to average out scheduling jitter, and its throughput swung roughly 2x from run to run while 16 MB and 64 MB were steady. The benchmark now scales the iteration count so every size hashes a comparable total volume, and 1 MB lands near 14x like the larger sizes, not the 7.2x the README used to show. Benchmark and docs only; no library change.
1.0.0 #
First stable release. The public API is now committed to semantic versioning:
the hashing functions, Blake3Hasher, and the blake3KeyLength /
blake3OutLength constants will not change in a breaking way without a 2.0.0.
The package covers all three BLAKE3 modes (hash, keyed, and key derivation),
extendable output through finalize(outputLength:, seek:), and one-shot,
incremental, and streaming hashing, all over the official BLAKE3 C sources
compiled from a build hook.
blake3HexStreamremains as a deprecated alias forblake3StreamHex(the 0.4.0 rename) and now points at removal in 2.0.0 rather than 1.0.0, so code written against 0.4.0 keeps working across the 1.0.0 boundary.
0.4.0 #
- Rename
blake3HexStreamtoblake3StreamHexso the hex variant is aHexsuffix on its base name, matching every other pair in the API:blake3andblake3Hex,blake3Keyedandblake3KeyedHex,blake3DeriveKeyandblake3DeriveKeyHex.blake3HexStreamstill works as a deprecated alias that forwards toblake3StreamHex, and will be removed in 1.0.0.
0.3.1 #
- Declare
platforms: {linux, macos, windows}inpubspec.yaml. Flutter's build-hooks support isn't stable yet and this package has no Android/iOS build today; pub.dev had inferred support for all five platforms from static analysis alone with no declaration to override it.
0.3.0 #
Blake3Hasher.updatenow takes aList<int>instead of aUint8List. Chunks from aStream<List<int>>(a file'sopenRead(), a socket) arrive as plainList<int>, so the documented manual streaming loop did not compile without wrapping every chunk inUint8List.fromList. AUint8Liststill passes through with no copy; any other list is copied once, the same coercionblake3Streamalready does. Source-compatible:Uint8Listis aList<int>.
0.2.2 #
- Widen the native-toolchain constraints so the package can be installed in a
Flutter app at all.
hooks2.1.0 andnative_toolchain_c0.19.3 raised theirmetafloor to ^1.19.0, and Flutter's SDK pinsmetato 1.17.0, soflutter pub addfailed at version solving with "flutter from sdk is incompatible". Allowinghooks >=2.0.2andnative_toolchain_c >=0.19.2lets the solver pick a version that works with the pinnedmeta, while a pure-Dart project still resolves to the newest. No API or behaviour change.
0.2.1 #
- Declare the benchmark chart in
pubspec.yamlso pub.dev renders it on the package page. The chart was already in the repository and the README, but pub.dev shows only what thescreenshots:field points at, so the page a reader lands on from search opened with text where the measurement should have been.
0.2.0 #
- Add
blake3Streamandblake3HexStream: one call to hash aStream<List<int>>(a file'sopenRead(), an upload, any byte stream) as it arrives, without holding the whole input in memory. Each drives aBlake3Hasherinternally and disposes it when the stream ends. This is the memory-safe way to hash something too large to load at once, and unlike a SHA-256 stream frompackage:cryptoit runs at BLAKE3's throughput. TheoutputLength(XOF) argument carries through.
0.1.2 #
- Add hex variants for the raw-output paths:
blake3KeyedHex,blake3DeriveKeyHex, andBlake3Hasher.finalizeHex. Keyed, derived, and streamed digests now format to hex the wayblake3Hexalready does, so callers stop re-implementing it (the example used to).
0.1.1 #
- Docs: sharpen the pub.dev description to lead with the value and the terms people search.
0.1.0 #
Initial release, vendoring the official BLAKE3 C implementation 1.8.5.
- One-shot hashing:
blake3,blake3Hex. - Streaming hashing:
Blake3Hasherwithupdate,finalize,reset, anddispose. - Keyed hashing (MAC/PRF):
blake3Keyed,Blake3Hasher.keyed. - Key derivation (KDF):
blake3DeriveKey,Blake3Hasher.deriveKey. - Extendable output (XOF) via
outputLengthandseek. - Native code builds automatically via Dart build hooks (Dart 3.10+); no manual native setup. arm64 uses the NEON kernel; other architectures use the portable C kernel.
- Verified against the official BLAKE3 test vectors (default, keyed, and derive-key modes, extended output, and streaming).
