compat.blake3
#includeBLAKE3 cryptographic hash function (portable C implementation)
#include <blake3.h>
mcpp add compat.blake3@1.8.9
Usage
From this repository's own test project — built and run by CI, not written for the website.
#include <blake3.h>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <string>
namespace {
std::string to_hex(const uint8_t* bytes, size_t len) {
static const char digits[] = "0123456789abcdef";
std::string out;
out.reserve(len * 2);
for (size_t i = 0; i < len; ++i) {
out.push_back(digits[bytes[i] >> 4]);
out.push_back(digits[bytes[i] & 0x0F]);
}
return out;
}
} // namespace
// …
tests/examples/blake3/tests/blake3.cpp · project tests/examples/blake3
Build
- targets
blake3 (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/c
Sources (3)
*/c/blake3.c*/c/blake3_dispatch.c*/c/blake3_portable.c
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
1.8.9 latest |
LinuxWindowsmacOS | source | e5c4e4cc0cf3… |