Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

switch json Hashes field to a map of bytes #24

Open
groob opened this issue Jun 27, 2017 · 0 comments
Open

switch json Hashes field to a map of bytes #24

groob opened this issue Jun 27, 2017 · 0 comments

Comments

@groob
Copy link
Contributor

groob commented Jun 27, 2017

Right now we have the following structure:

// FileIntegrityMeta hashes and length of a file based resource to help ensure
// the binary footprint of the file hasn't been tampered with
type FileIntegrityMeta struct {
	Hashes map[hashingMethod]string `json:"hashes"`
	Length int                      `json:"length"`
}

The hashes are represented as a dictionary of strings, but it would be more accurate ( and easier to work with ) if we used a byte slice for each checksum.

Relevant from the notary types https://github.com/docker/notary/blob/c04e3e6d05881045def11167c51d4a8baa34899a/tuf/data/types.go#L169-L184

@groob groob changed the title swith json Hashes field to a map of bytes switch json Hashes field to a map of bytes Jun 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant