nebulae.dotBlake3 0.1.1

dotnet add package nebulae.dotBlake3 --version 0.1.1
                    
NuGet\Install-Package nebulae.dotBlake3 -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nebulae.dotBlake3" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nebulae.dotBlake3" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="nebulae.dotBlake3" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nebulae.dotBlake3 --version 0.1.1
                    
#r "nuget: nebulae.dotBlake3, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nebulae.dotBlake3@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nebulae.dotBlake3&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=nebulae.dotBlake3&version=0.1.1
                    
Install as a Cake Tool

dotBlake3

A high-performance, minimal, cross-platform wrapper for the optimized reference Blake3 hash function implementation. Supports parallel hashing for ultra-fast performance (~50ms per gig on Ryzen 9 3950X under Windows & Linux and ~130ms per gig on M1 Mac Mini).

The native backend is compiled straight from the official C/C++ implementation of Blake3, along with oneTBB for parallel hashing.

Passes all reference test vectors and is fully compatible with the official Blake3 specification.

Tests and benchmarks are included and available in the Github repo.

This one has been beaten up pretty good, with cross-platform testing on Windows, Linux, and macOS.

NuGet


Features

  • Cross-platform: Works on Windows, Linux, and macOS (x64 & Apple Silicon).
  • High performance: Optimized for speed, leveraging native SIMD-enabled code (neon, SSE2, SSE4.1 AVX2 & AVX512). Has scalar fallbacks for unsupported platforms.
  • Easy to use: Simple API for generating hashes and keyed hashes.
  • Secure: Uses the reference implementation, which is widely trusted in the industry.
  • Minimal dependencies: No external dependencies required (all are included), making it lightweight and easy to integrate.

Requirements

  • .NET 8.0 or later
  • Windows x64, Linux x64, or macOS (x64 & Apple Silicon)

Usage

One-Shot Hashing:


using nebulae.dotBlake3;

byte[] data = File.ReadAllBytes("bigfile.bin");
byte[] digest = Blake3.ComputeHash(data); // 32-byte digest

With Custom Output Length:


byte[] digest = Blake3.ComputeHash(data, outputLength: 64); // 64-byte XOF

Keyed Hashing (MAC-like use case):


byte[] key = Encoding.ASCII.GetBytes("whats the Elvish word for friend");
byte[] digest = Blake3.ComputeKeyedHash(data, key); // 32-byte keyed digest

Derived Keying (KDF-like use case):


string context = "BLAKE3 example usage context";
byte[] digest = Blake3.ComputeDerivedKey(data, context); // 32-byte derived key

Incremental Hashing (streaming):


using nebulae.dotBlake3;

using var hasher = new Blake3();

foreach (var chunk in ReadChunks("bigfile.bin", 64 * 1024))
    hasher.Update(chunk);

byte[] digest = hasher.Finalize(); // Default: 32 bytes

Parallel Hashing (TBB backend) Ideal for >256KB buffers - Super Fast (5-8x speedup):


using var hasher = new Blake3();

hasher.UpdateParallel(data); // Automatically splits into chunks and hashes in parallel
byte[] digest = hasher.Finalize();


Installation

You can install the package via NuGet:


$ dotnet add package nebulae.dotBlake3

Or via git:


$ git clone https://github.com/nebulaeonline/dotBlake3.git
$ cd dotBlake3
$ dotnet build


License

MIT

Roadmap

Unless there are vulnerabilities found, there are no plans to add any new features.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 250 8/6/2025
0.1.0 243 8/5/2025