blake3
Version, currently 1.4.03 versions
- 1.4.0latestMar 25, 2025
- 1.3.0not indexedMar 25, 2025
- 1.2.0not indexedMar 25, 2025
github.com/GeopJr/blake3.cr
Blake3 for Crystal (fork)
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
blake3:
github: GeopJr/blake3.cr
version: ~> 1.4.0Then run:
shards installshard.yml
- Crystal
>= 1.0.0- License
- MIT
- Authors
- Didactic Drunk, GeopJr
- Target
blake3_hashfrom examples/blake3_hash.cr
Dependencies
This version declares no dependencies.
README
BLAKE3
Blake3 using the official BLAKE3 c implementation.
Features
- [x] Fast. ~2x faster than Sodium::Digest::Blake2b.
- [x] Uses Crystal's Digest API.
- [x] Keyed digests.
- [ ] Key derivation.
- [x] Configurable final size.
- [ ] Streaming final output.
- [x] Tested against official test vectors.
- [x] Builds a blake3 c static library.
Speed
examples/blake3_hash.cr is approximately the same speed as b3sum with 1 thread or mmap disabled.
Installation
-
Add the dependency to your
shard.yml:dependencies: blake3: github: GeopJr/blake3.cr -
Run
shards install
Usage
require "blake3"
digest = Digest::Blake3.new
digest.update data
p digest.final.hexstring
output_size = 1024
digest = Digest::Blake3.new(output_size)
digest.update data
p digest.final.hexstring => ...a.very.long.string...
digest = Digest::Blake3.new(key: "super secret exactly 32 byte key")
digest.update data
p digest.final.hexstring
For further API documentation see Crystal's Digest API
Contributing
- Fork it (https://github.com/GeopJr/blake3.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Didactic Drunk - creator and maintainer
- GeopJr - maintainer of this fork
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.4.0- Tagged
- Mar 25, 2025
- Commit
28b06db5b1fc- Crystal
>= 1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/GeopJr/blake3.cr
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 3