Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

descriptor: Require lowercase hex #292

Merged
merged 1 commit into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions descriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ It uniquely identifies content by taking a [collision-resistant hash](https://en
If the identifier can be communicated in a secure manner, one can retrieve the content from an insecure source, calculate the digest independently, and be certain that the correct content was obtained.

The value of the digest property, the _digest string_, is a serialized hash result, consisting of an _algorithm_ portion and a _hex_ portion.
The algorithm identifies the methodology used to calculate the digest; the hex portion is the hex-encoded result of the hash.
The algorithm identifies the methodology used to calculate the digest; the hex portion is the lowercase hex-encoded result of the hash.

The digest string matches the following grammar:
The digest string MUST match the following grammar:

```
digest := algorithm ":" hex
algorithm := /[a-z0-9_+.-]+/
hex := /[A-Fa-f0-9]+/
hex := /[a-f0-9]+/
```

Some example digest strings include the following:
Expand Down
2 changes: 1 addition & 1 deletion schema/defs-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"digest": {
"description": "the cryptographic checksum digest of the object, in the pattern '<hash>:<hexadecimal digest>'",
"type": "string",
"pattern": "^[a-z0-9_+.-]+:[a-fA-F0-9]+$"
"pattern": "^[a-z0-9_+.-]+:[a-f0-9]+$"
},
"manifestDescriptor": {
"id": "https://opencontainers.org/schema/image/manifestDescriptor",
Expand Down