StaticfromStaticfromCreate a Digest from data, validating the length. Alias for fromData for compatibility with Rust API.
StaticfromStaticfromCompute SHA-256 digest of data (called "image" in Rust).
The data to hash
StaticfromCompute SHA-256 digest from multiple data parts.
The parts are concatenated and then hashed.
Array of byte arrays to concatenate and hash
StaticfromStatichashCompute SHA-256 digest of data (legacy alias for fromImage).
Get the raw digest bytes as a copy.
Get a reference to the raw digest bytes.
Get hex string representation.
Get hex string representation (alias for hex()).
Get base64 representation.
Get the first four bytes of the digest as a hexadecimal string. Useful for short descriptions.
Validate the digest against the given image.
The image is hashed with SHA-256 and compared to this digest.
true if the digest matches the image.
Get string representation.
A Digest is its own digest provider - returns itself.
Returns the CBOR tags associated with Digest.
Returns the untagged CBOR encoding (as a byte string).
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
StaticfromStaticfromStaticfromReturns the UR representation of the Digest. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.
Returns the UR string representation.
StaticfromStaticfromStaticvalidateValidate the given data against the digest, if any.
Returns true if the digest is undefined or if the digest matches the
image's digest. Returns false if the digest does not match.
Get the digest data.