From af2e10943ec42ed41d36ffb5f3993ff091f94771 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 1 Jun 2019 23:33:58 -0700 Subject: [PATCH] add hash type --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3647c8a..35b3232 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Look at adding units. ### Hash String -The hash string is name of hash followed by a colon followed by the hex string. +The hash string is name of hash (hash type) followed by a colon followed by the hex string (hash value). The list of valid hashes is: - sha256 @@ -49,6 +49,10 @@ The list of valid hashes is: A reference is the UUID optionally followed by two dashes (--) followed by the modified date of the object. The modified date is neccessary in some cases to know what version of the object is being referenced. +### Hashes + +For storing multiple hashes, a hashes type is used. This will be serialized as a list of hash strings. The list is used to reduce serialization overhead, and when loaded, may be parsed out into a dictionary for faster lookup. Only one hash string of each hash type is allowed. If there are duplicates, the object is invalid and MUST be ignored. + ## Objects These are the nodes that contain a majority of the data.