Skip to content

Commit

Permalink
Merge pull request #292 from wking/lowecase-hex
Browse files Browse the repository at this point in the history
descriptor: Require lowercase hex
  • Loading branch information
stevvooe authored Sep 12, 2016
2 parents f964286 + 660d130 commit 4aa74ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 4aa74ac

Please sign in to comment.