Thomas Ward c5a48b15bd
Make default hash lib configurable without code changes via CLI argument (#3947)
* cli_args: Add --duplicate-check-hash-function.

* server.py: compare_image_hash configurable hash function

Uses an argument added in cli_args to specify the type of hashing to default to for duplicate hash checking.  Uses an `eval()` to identify the specific hashlib class to utilize, but ultimately safely operates because we have specific options and only those options/choices in the arg parser.  So we don't have any unsafe input there.

* Add hasher() to node_helpers

* hashlib selection moved to node_helpers

* default-hashing-function instead of dupe checking hasher

This makes a default-hashing-function option instead of previous selected option.

* Use args.default_hashing_function

* Use safer handling for node_helpers.hasher()

Uses a safer handling method than `eval` to evaluate default hashing function.

* Stray parentheses are evil.

* Indentation fix.

Somehow when I hit save I didn't notice I missed a space to make indentation work proper.  Oops!
2024-07-16 18:27:09 -04:00
..
2024-07-14 10:07:36 -04:00
2024-02-23 02:39:35 -05:00
2024-07-11 16:52:26 -04:00
2023-01-16 22:37:14 -05:00
2024-06-27 18:43:11 -04:00
2024-06-10 16:00:03 -04:00
2024-01-21 21:51:22 -05:00
2024-02-18 02:20:23 -05:00
2024-06-16 02:03:53 -04:00
2024-07-11 16:52:26 -04:00
2023-01-16 22:37:14 -05:00
2024-05-27 19:08:27 -04:00