aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/file_lookup.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-05 15:56:52 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-05 15:56:52 -0700
commit388503d92ff8a1f26a0376cc42cefb077a1d6401 (patch)
treeb2329cb6951bfbc5f98a0663f2e4b7991a1949ca /python/fatcat_web/templates/file_lookup.html
parent805a8b1001754fb8397e539dbc15a6cfd65661f2 (diff)
downloadfatcat-388503d92ff8a1f26a0376cc42cefb077a1d6401.tar.gz
fatcat-388503d92ff8a1f26a0376cc42cefb077a1d6401.zip
more lookup views
Diffstat (limited to 'python/fatcat_web/templates/file_lookup.html')
-rw-r--r--python/fatcat_web/templates/file_lookup.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/file_lookup.html b/python/fatcat_web/templates/file_lookup.html
new file mode 100644
index 00000000..c4255f47
--- /dev/null
+++ b/python/fatcat_web/templates/file_lookup.html
@@ -0,0 +1,55 @@
+{% extends "base.html" %}
+{% import "entity_macros.html" as entity_macros %}
+
+{% block body %}
+
+<h1>Lookup File by Hash</h1>
+
+{% if lookup_error == 400 %}
+<div class="ui error message">
+<div class="header">400: Syntax Error</div>
+<b>{{ lookup_key }}:{{ lookup_value }}</code></b> doesn't look right to us. See
+below for details.
+</div>
+{% elif lookup_error == 404 %}
+<div class="ui error message">
+<div class="header">404: Not Found</div>
+Couldn't find a file with that hash (<b><code>{{ lookup_key }}:{{
+lookup_value }}</code></b>). If you think it should be in the catalog, you could
+search for an existing record missing that hash, or create a new file
+entity.
+</div>
+{% endif %}
+
+<div class="ui top attached segment">
+
+<h2>SHA-1, SHA-256, MD5</h2>
+<p><a href="https://en.wikipedia.org/wiki/SHA-1">SHA-1</a> and
+<a href="https://en.wikipedia.org/wiki/SHA-2">SHA-256</a> are popular
+cryptographic message digests. They can be used to detect accidental
+corruption, intentional modification, and can be used as unique identifiers for
+a file. The chance of there existing multiple files with the same hash is
+effectively zero due to random chance; the chance of somebody having
+intentionally created files with the same hash depends on the strength of the
+hash function.
+
+<p><b>SHA-256</b> is considered "strong" today and used in new software.
+{{ entity_macros.lookup_form("file", "sha256", "cd65a99c0d95f3208f4ea28bc73f641a6901a22dfb882d14d5c208821b56c09c", lookup_key, lookup_value, lookup_error) }}
+<i>&nbsp; Lower-case hexideximal, 64 characters</i>
+<br><br>
+
+<p><b>SHA-1</b> has shown weaknesses, but is used widely in data archiving software.
+{{ entity_macros.lookup_form("file", "sha1", "79ed4e54acdd521ca5f7b52a2964c9c116c3e3bf", lookup_key, lookup_value, lookup_error) }}
+<i>&nbsp; Lower-case hexideximal, 40 characters</i>
+<br><br>
+
+<p><b><a href="https://en.wikipedia.org/wiki/MD5">MD5</a></b> is an older but still
+commonly used checksum. It was originally designed in 1992 to be
+cryptographically secure, but is no longer considered secure in that context.
+It is still perfectly adequate for detecting accidental file corruption.
+{{ entity_macros.lookup_form("file", "md5", "eebc51dd5684ec7fd07f7ac0c30e7a78", lookup_key, lookup_value, lookup_error) }}
+<i>&nbsp; Lower-case hexideximal, 32 characters</i>
+
+</div>
+
+{% endblock %}