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
Copy file name to clipboardExpand all lines: descriptor.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,9 @@ algorithm-separator := /[+._-]/
76
76
encoded := /[a-zA-Z0-9=_-]+/
77
77
```
78
78
79
+
Note that _algorithm_ MAY impose algorithm-specific restriction on the grammar of the _encoded_ portion.
80
+
See also [Registered Algorithms](#registered-identifiers).
81
+
79
82
Some example digest strings include the following:
80
83
81
84
digest | algorithm | Registered |
@@ -137,11 +140,17 @@ If a useful algorithm is not included in the above table, it SHOULD be submitted
137
140
[SHA-256][rfc4634-s4.1] is a collision-resistant hash function, chosen for ubiquity, reasonable size and secure characteristics.
138
141
Implementations MUST implement SHA-256 digest verification for use in descriptors.
139
142
143
+
When the _algorithm identifier_ is `sha256`, the _encoded_ portion MUST match `/[a-f0-9]{64}/`.
144
+
Note that `[A-F]` MUST NOT be used here.
145
+
140
146
#### SHA-512
141
147
142
148
[SHA-512][rfc4634-s4.2] is a collision-resistant hash function which [may be more perfomant][sha256-vs-sha512] than [SHA-256](#sha-256) on some CPUs.
143
149
Implementations MAY implement SHA-512 digest verification for use in descriptors.
144
150
151
+
When the _algorithm identifier_ is `sha512`, the _encoded_ portion MUST match `/[a-f0-9]{128}/`.
152
+
Note that `[A-F]` MUST NOT be used here.
153
+
145
154
## Examples
146
155
147
156
The following example describes a [_Manifest_](manifest.md#image-manifest) with a content identifier of "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" and a size of 7682 bytes:
0 commit comments