This is the D8 version of the encrypted_files project.
The file encrypt module allows you to encrypt files uploaded via Drupal using
the encrypt and key modules. When the files are requested, they'll get decrypted
Configure file encrypt
Ideally first configure a different path at which the encrypted files should be
stored. Similar to private files you need an entry in settings.php for that:
$settings['encrypted_file_path'] = '';