Page 1 of 1

How to encrypt use ES2Writer?

Posted: Tue Apr 14, 2015 1:40 pm
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!

Re: How to encrypt use ES2Writer?

Posted: Tue Apr 14, 2015 3:50 pm
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