Description of issue or feature request:
As per the specification (v1.0.1) length and hashes fields in timestamp and snapshot metadata are optional. The reference implementation should reflect this.
Current behavior:
- timestamp metadata always includes length and hashes of snapshot metadata (see
reposoitory_lib.generate_timestamp_metadata)
- snapshot metadata always excludes length and hashes of (delegated) targets metadata (see
repository_lib.generate_snapshot_metadata)
Expected behavior:
Add option to include/exclude these fields in the relevant functions in repository_lib. Since these functions are usually called via write/writeall the option should be made available there too. It's also conceivable to configure this via attributes on the Repository object.