About load a file CryptographicException

Discussion and help for Easy Save 3
Post Reply
shortlin
Posts: 3
Joined: Thu Jul 29, 2021 5:51 am

About load a file CryptographicException

Post by shortlin »

Hi,My Unity is
2019.4.1f1

EasySave3 File Version is:
3.3.2f1

Our game has published one month now.we got some players has this error in their player log file:

Code: Select all

CryptographicException: Could not decrypt file. Please ensure that you are using the same password used to encrypt the file.
  at ES3Internal.ES3Stream.CreateStream (ES3Settings settings, ES3Internal.ES3FileMode fileMode) [0x00105] in <a6fb06e440164690a62d30fe36a76a86>:0 
  at ES3Reader.Create (ES3Settings settings) [0x00000] in <a6fb06e440164690a62d30fe36a76a86>:0 
  at ES3.Load[T] (System.String key, ES3Settings settings) [0x00016] in <a6fb06e440164690a62d30fe36a76a86>:0 
  at ES3.Load[T] (System.String key, System.String filePath, ES3Settings settings) [0x00008] in <a6fb06e440164690a62d30fe36a76a86>:0 
I use easy file in our save and load system.I found some save files would cause this error(some not), so I just let some player delete that problem save file.(there are all no problem in my computer, so It is difficult to me to find the solution )
I dont know why would it happen.

So does it means the file when it is saving file happen some problems?

I just Use ES3.Save(and give the ES3Settings which has my password) this functon to save the file.

Should I do something before saving?
and Is there a way to fix the file which has the CryptographicException?

User avatar
Joel
Moodkie Staff
Posts: 3678
Joined: Wed Nov 07, 2012 10:32 pm

Re: About load a file CryptographicException

Post by Joel »

Hi there,

This errors suggests that the data has changed after decryption, or the wrong encryption password is being used. Unfortunately it wouldn't be possible to tell exactly why this is.

I also recommend updating to the latest version of Easy Save as you're on quite an old version and see if the issue persists.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

shortlin
Posts: 3
Joined: Thu Jul 29, 2021 5:51 am

Re: About load a file CryptographicException

Post by shortlin »

Thank you.
It is very strange to happen this,just because I use the same password .Except the player change the file.
So I am curious if when the file is saving and some unkown problem cause it broken.could the file using the Es3.Load would make this exception?

Or maybe There is someone change the file's password,could we have a way to know the password?

shortlin
Posts: 3
Joined: Thu Jul 29, 2021 5:51 am

Re: About load a file CryptographicException

Post by shortlin »

Sorry maybe my English is too bad to descrip my two question(I am Taiwanese)

I just want to know 2 quiestions:

1.If the file is broken,when I use ES3.Load,would it happen CryptographicException as the first question as I ask?

2.If someone change the file's password,could we use a way to get the password?(or Could I know someone change the file's password?I just want to know it is not my code's problem...)

Just because if,we can't know why the problem happen.we must give up the plugin in next product....

User avatar
Joel
Moodkie Staff
Posts: 3678
Joined: Wed Nov 07, 2012 10:32 pm

Re: About load a file CryptographicException

Post by Joel »

shortlin wrote:
Fri Jul 30, 2021 4:01 am
Sorry maybe my English is too bad to descrip my two question(I am Taiwanese)

I just want to know 2 quiestions:

1.If the file is broken,when I use ES3.Load,would it happen CryptographicException as the first question as I ask?

2.If someone change the file's password,could we use a way to get the password?(or Could I know someone change the file's password?I just want to know it is not my code's problem...)

Just because if,we can't know why the problem happen.we must give up the plugin in next product....
Hi there,

It might also throw an ArgumentException or ArgumentOutOfRangeException.

It's not possible to know why the problem happens for the same reason it's not possible to know what the password is: if you could derive this information from the file data, the encryption wouldn't be secure.

Most often these errors occur because the file has been tampered with or the OS or an external process has corrupted the file (for example, a piece of cloud software has attempted to apply an encoding to the file). This isn't something which is in your or Easy Save's control, as the OS provides no way to prevent a user or process from accessing the file externally.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Post Reply