If you are going to S-Off your HTC 10 you will have to wipe your data to wipe encryption. This can be done in TWRP by choosing the format encryption option under the wipe settings. Alternatively you can use a simple one click script developed by "topjohnwu". The script allows you to wipe encrypted data without touching internal storage. This means that all your photos and personal data will remain untouched and you will be able to gain access to your device once again. Head to the link below to grab the file.
via XDA