Added support for unencrypted SaveLoad2 format save files like Elden Ring.
For DecryptedUserData in the existing elden-ring branch, it is initialized to null.
Through this commit, the constructor of Sl2UserData checks whether the key exists and stores it in the newly added member _encrypted.
When DecryptedUserData is called after parsing the sl2 file, the plaintext of the unencrypted file is saved according to the status of the _encrypted member. Or, if it is encrypted, proceed with AES decryption.
I'm sorry I couldn't write better code because I didn't have deep knowledge of C#.
If there is a better way, let's discuss it.
Added support for unencrypted SaveLoad2 format save files like Elden Ring.
For
DecryptedUserData
in the existing elden-ring branch, it is initialized to null. Through this commit, the constructor ofSl2UserData
checks whether the key exists and stores it in the newly added member_encrypted
. WhenDecryptedUserData
is called after parsing the sl2 file, the plaintext of the unencrypted file is saved according to the status of the_encrypted
member. Or, if it is encrypted, proceed with AES decryption.I'm sorry I couldn't write better code because I didn't have deep knowledge of C#. If there is a better way, let's discuss it.