Consolidate crypto functions, move allowed_upload to the (new) filesystem module where such tasks are now handled