According to the specification and JSON schema, the answer is yes:
|
"hash": { |
|
"description": "SHA-256 hash of the resource", |
|
"type": "string", |
|
"contentEncoding": "base64" |
|
} |
https://github.com/readium/lcp-specs/blob/master/releases/lcp/lcp-1-0-3.md#link-object
SHA-256 hash of the resource - Base 64 encoded octet sequence
However the LCP Go server implementation encodes the hash property as the hexadecimal string representation of the SHA256 digest:
{
"rel": "publication",
"href": "https://domain.com/contents/038fe68f-b4b9-4d87-a70f-59e843205359",
"type": "application/epub+zip",
"title": "accessible-epub3",
"length": 4105975,
"hash": "a9db6e6f45f83e1de50a00c0cbb033ed6c24daa3275537a29e05a46db312ec04"
}
Which is correct?
According to the specification and JSON schema, the answer is yes:
lcp-specs/schema/link.schema.json
Lines 42 to 46 in 9337294
https://github.com/readium/lcp-specs/blob/master/releases/lcp/lcp-1-0-3.md#link-object
However the LCP Go server implementation encodes the
hashproperty as the hexadecimal string representation of the SHA256 digest:{ "rel": "publication", "href": "https://domain.com/contents/038fe68f-b4b9-4d87-a70f-59e843205359", "type": "application/epub+zip", "title": "accessible-epub3", "length": 4105975, "hash": "a9db6e6f45f83e1de50a00c0cbb033ed6c24daa3275537a29e05a46db312ec04" }Which is correct?