Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Sha256.ixx File Reference

Streaming SHA-256, for verifying downloaded model blobs against their digests. More...

#include <algorithm>
#include <array>
#include <cstdint>
#include <cstddef>
#include <string>

Classes

class  Mila::Distribution::Sha256
 Incremental SHA-256. More...

Namespaces

namespace  Mila
 Mila main API namespace.

Functions

std::string Mila::Distribution::sha256Hex (const void *data, size_t length)
 One-shot convenience for small inputs.

Detailed Description

Streaming SHA-256, for verifying downloaded model blobs against their digests.

Implemented rather than taken from a dependency: it is roughly eighty lines, the algorithm is fixed, and the alternatives are a platform split (BCrypt / OpenSSL EVP) or a second vendored library in a project whose whole third-party surface is a handful of packages. Correctness is pinned by the NIST vectors in the tests, not assumed.