Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARC-Block-Digest and WARC-Payload-Digest examples are invalid #64

Open
ato opened this issue Apr 30, 2020 · 0 comments
Open

WARC-Block-Digest and WARC-Payload-Digest examples are invalid #64

ato opened this issue Apr 30, 2020 · 0 comments

Comments

@ato
Copy link
Member

ato commented Apr 30, 2020

Section 5.8 and 5.9 in the WARC 1.1 spec include the following two examples:

WARC-Block-Digest: sha1:AB2CD3EF4GH5IJ6KL7MN8OPQ
WARC-Payload-Digest: sha1:3EF4GH5IJ6KL7MN8OPQAB2CD

These are invalid because:

  1. The character "8" is not part of the Base32 alphabet.

  2. The strings are of length 24. The SHA-1 function produces 160-bit output which when encoded as a Base32 string should be 160 / 5 = 32 characters long.

Note that the additional examples in Annex B do not suffer from these problems:

WARC-Block-Digest: sha1:2ASS7ZUZY6ND6CCHXETFVJDENAWF7KQ2
WARC-Payload-Digest: sha1:CCHXETFVJD2MUZY6ND6SS7ZENMWF7KQ2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant