How to encrypt use ES2Writer?

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
boboshaw
Posts: 1
Joined: Tue Apr 14, 2015 1:30 pm

How to encrypt use ES2Writer?

Post by boboshaw »

I use the follow code to encrypt
ES2Settings settings = new ES2Settings( );
settings.Init( );
settings.encrypt = true;
settings.encryptionType = ES2Settings.EncryptionType.AES128;
settings.encryptionPassword = "xo@ox.1990.com.my";
using( ES2Writer writer = ES2Writer.Create( savePath,settings ) )
{
writer.Write( DATA_VERSION );
writer.Write( Application.platform.ToString( ) );
writer.Save( false );
}
But the encrpty does not work!
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: How to encrypt use ES2Writer?

Post by Joel »

Hi there,

Your code is working fine for me. How do you know it's not encrypting?

You should also take in mind that tags themselves are not encrypted, but the data for that tag is. Otherwise you would need to do a full decrypt to load any data from the file, which would be very inefficient.

All the best,
Joel
Locked