pub struct Target {
pub length: u64,
pub hashes: Hashes,
pub custom: HashMap<String, Value>,
pub _extra: HashMap<String, Value>,
}Expand description
TUF 4.5: TARGETS is an object whose format is the following:
{ TARGETPATH : {
"length" : LENGTH,
"hashes" : HASHES,
("custom" : { ... }) }
, ...
}Fields§
§length: u64LENGTH is the integer length in bytes of the target file at TARGETPATH.
hashes: HashesHASHES is a dictionary that specifies one or more hashes, including the cryptographic hash
function. For example: { "sha256": HASH, ... }. HASH is the hexdigest of the cryptographic
function computed on the target file.
custom: HashMap<String, Value>If defined, the elements and values of “custom” will be made available to the client application. The information in “custom” is opaque to the framework and can include version numbers, dependencies, requirements, and any other data that the application wants to include to describe the file at TARGETPATH. The application may use this information to guide download decisions.
_extra: HashMap<String, Value>Extra arguments found during deserialization.
We must store these to correctly verify signatures for this object.
If you’re instantiating this struct, you should make this HashMap::empty().