You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ContainerRegistry: Parse digest algorithm and value into separate fields (#144)
Motivation
----------
SHA256 is the most common digest algorithm for blobs, but SHA512 can
also be used and the [image
specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md#digests)
provides for other options. This change lays the foundations for
generating and validating hashes other than SHA256, and reduces the use
of untyped strings to represent digests.
Modifications
-------------
* Parse the digest into separate algorithm and value fields, instead of
just validating
* Add support for parsing and generating SHA512 digests
* Throw a meaningful error instead of asserting when the registry
returns an unexpected digest for an uploaded blob
Result
------
SHA512 digests can be parsed and verified
Test Plan
---------
Existing tests continue to pass.
New parser tests added for SHA512 digests.
0 commit comments