From 388503d92ff8a1f26a0376cc42cefb077a1d6401 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 5 Jun 2019 15:56:52 -0700 Subject: more lookup views --- python/fatcat_web/templates/file_lookup.html | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 python/fatcat_web/templates/file_lookup.html (limited to 'python/fatcat_web/templates/file_lookup.html') 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 %} + +

Lookup File by Hash

+ +{% if lookup_error == 400 %} +
+
400: Syntax Error
+{{ lookup_key }}:{{ lookup_value }} doesn't look right to us. See +below for details. +
+{% elif lookup_error == 404 %} +
+
404: Not Found
+Couldn't find a file with that hash ({{ lookup_key }}:{{ +lookup_value }}). 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. +
+{% endif %} + +
+ +

SHA-1, SHA-256, MD5

+

SHA-1 and +SHA-256 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. + +

SHA-256 is considered "strong" today and used in new software. +{{ entity_macros.lookup_form("file", "sha256", "cd65a99c0d95f3208f4ea28bc73f641a6901a22dfb882d14d5c208821b56c09c", lookup_key, lookup_value, lookup_error) }} +  Lower-case hexideximal, 64 characters +

+ +

SHA-1 has shown weaknesses, but is used widely in data archiving software. +{{ entity_macros.lookup_form("file", "sha1", "79ed4e54acdd521ca5f7b52a2964c9c116c3e3bf", lookup_key, lookup_value, lookup_error) }} +  Lower-case hexideximal, 40 characters +

+ +

MD5 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) }} +  Lower-case hexideximal, 32 characters + +

+ +{% endblock %} -- cgit v1.2.3