Durable SHA-256 identity for sealed media bytes. More...
#include <assets.hpp>
Public Member Functions | |
| constexpr | ContentHash () noexcept=default |
| std::string | to_hex () const |
| Returns the lowercase 64-digit encoding; invalid hashes encode as 64 zeroes. | |
| constexpr bool | valid () const noexcept |
| Returns whether this value was constructed from a complete digest. | |
| constexpr const std::array< std::uint8_t, 32 > & | bytes () const noexcept |
| Borrows the 32 digest bytes for the lifetime of this value. | |
| constexpr auto | operator<=> (const ContentHash &) const =default |
Static Public Member Functions | |
| static std::optional< ContentHash > | from_hex (std::string_view hex) noexcept |
| Decodes exactly 64 lowercase hexadecimal digits, or returns null on malformed input. | |
Durable SHA-256 identity for sealed media bytes.
Paths and package locations are resolution hints and never participate in equality. A default-constructed value is invalid.
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
Borrows the 32 digest bytes for the lifetime of this value.
|
staticnoexcept |
Decodes exactly 64 lowercase hexadecimal digits, or returns null on malformed input.
|
constexprdefault |
| std::string pulp::timeline::ContentHash::to_hex | ( | ) | const |
Returns the lowercase 64-digit encoding; invalid hashes encode as 64 zeroes.
|
inlineconstexprnoexcept |
Returns whether this value was constructed from a complete digest.