File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,9 @@ def public_key_to_pyasn1(public_key_dict):
243
243
244
244
def hex_str_to_pyasn1_octets (hex_string ):
245
245
"""
246
-
246
+ Convert a hex string into a pyasn1 OctetString object.
247
+ Example arg: '12345abcd' (string / unicode)
248
+ Returns a pyasn1.type.univ.OctetString object.
247
249
"""
248
250
# TODO: Verify hex_string type.
249
251
@@ -273,8 +275,8 @@ def hex_str_to_pyasn1_octets(hex_string):
273
275
274
276
def hex_str_from_pyasn1_octets (octets_pyasn1 ):
275
277
"""
276
- Convert a pyasn1 OctetString object into a hex string.
277
- Example return: '4b394ae2'
278
+ Convert a pyasn1.type.univ. OctetString object into a hex string.
279
+ Example return: '4b394ae2' (string / unicode)
278
280
Raises Error() if an individual octet's supposed integer value is out of
279
281
range (0 <= x <= 255).
280
282
"""
Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ class HashesContainer(ac.Sequence):
110
110
"""
111
111
Single-element, vapid wrapper for Hashes, solely to match structure of the
112
112
TUF-internal metadata. (This layer could be removed from both metadata
113
- formats without loss of semantics or clarity, but would break backward
114
- compatibility.)
113
+ formats to result in a clearer definition without change to the implicit
114
+ semantics, but would break backward compatibility.)
115
115
Conceptual ASN.1 structure (Python pseudocode):
116
116
{'hashes': [
117
117
{'function': 'sha256', 'digest': '...'},
You can’t perform that action at this time.
0 commit comments