{"id":17603461,"url":"https://github.com/lebrunel/b3","last_synced_at":"2025-07-25T19:38:25.325Z","repository":{"id":65904191,"uuid":"602059428","full_name":"lebrunel/b3","owner":"lebrunel","description":"Pure Elixir implementation of the BLAKE3 hashing function.","archived":false,"fork":false,"pushed_at":"2023-03-09T23:53:39.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-16T17:46:53.534Z","etag":null,"topics":["blake3","elixir","hasing-algorith"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lebrunel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-15T12:14:32.000Z","updated_at":"2024-03-21T06:36:39.000Z","dependencies_parsed_at":"2024-10-23T00:30:30.710Z","dependency_job_id":null,"html_url":"https://github.com/lebrunel/b3","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"a55478f266a5d4b6f953c5923fdf2d7ecaebd6b9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lebrunel%2Fb3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lebrunel%2Fb3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lebrunel%2Fb3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lebrunel%2Fb3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lebrunel","download_url":"https://codeload.github.com/lebrunel/b3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243562419,"owners_count":20311276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blake3","elixir","hasing-algorith"],"created_at":"2024-10-22T13:48:49.018Z","updated_at":"2025-03-14T10:33:39.350Z","avatar_url":"https://github.com/lebrunel.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# B3\n\n![Hex.pm](https://img.shields.io/hexpm/v/b3?color=informational)\n![License](https://img.shields.io/github/license/lebrunel/b3?color=informational)\n![Build Status](https://img.shields.io/github/actions/workflow/status/lebrunel/b3/elixir.yml?branch=main)\n\nB3 is a pure Elixir implementation of [BLAKE3](https://blake3.io), a modern cryptographic hash function.\n\nAs well as regular hash, B3 is a PRF, MAC, KDF, and XOF. That's a lot of acronyms!\n\nB3 is a pure Elixir port of the BLAKE3 [reference implementation](https://github.com/BLAKE3-team/BLAKE3/blob/master/reference_impl/reference_impl.rs). Zero dependencies will make compilation and deployments simple, but if its\nperformance you're after, you may want to check out the [blake3 package](https://github.com/Thomas-Jean/blake3) which uses Rustler to bind to the Rust BLAKE3 implementation.\n\n## Installation\n\nThe package can be installed by adding `b3` to your list of dependencies in `mix.exs`.\n\n```elixir\ndef deps do\n  [\n    {:b3, \"~\u003e 0.1\"}\n  ]\nend\n```\n\n## Usage\n\nThe `B3` module provides three functions for all your hashing and key derivation needs:\n\n- `B3.hash/2` - Returns a hash of the given message.\n- `B3.keyed_hash/3` - Returns a keyed hash of the given message. Key must be 32 bytes.\n- `B3.derive_key/3` - Derives a key from the given key material and context string.\n\nAll functions accept a keyword list of options:\n\n- `:length` - length in bytes of the resulting digest (default 32)\n- `:encoding` - optional encoding of the resulting digest (from `:base16`, `:base64` or `:hex`)\n\n## Examples\n\n```elixir\nB3.hash(\"test\", encoding: :hex)\n\"4878ca0425c739fa427f7eda20fe845f6b2e46ba5fe2a14df5b1e32f50603215\"\n\nB3.keyed_hash(\"test\", \"testkeytestkeytestkeytestkeytest\", encoding: :hex)\n\"8bacb5b968184e269491c5022ec75d6b599ecf210ee3bb3a5208c1376f919202\"\n\nB3.derive_key(\"test\", \"[Test app] 1 Oct 2022 - Test keys\", encoding: :hex)\n\"79bb09c3d5f99890ef4a24316036dd7707e9c0e9d3315de168248e666639438d\"\n```\n\n## License\n\nEddy is open source and released under the [Apache-2 License](https://github.com/lebrunel/b3/blob/main/LICENSE).\n\n© Copyright 2023 lebrunel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebrunel%2Fb3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flebrunel%2Fb3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebrunel%2Fb3/lists"}