ExtendedXmlSerializer / home

A configurable and eXtensible Xml serializer for .NET.

Home Page:https://extendedxmlserializer.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UseEncryptionAlgorithm It no worked

wf-soft opened this issue · comments

IExtendedXmlSerializer serializer = new ConfigurationContainer()
.UseAutoFormatting()
.UseOptimizedNamespaces()
.Type<MySqlInfo>().Member(p=> p.Password, x=> x.UseEncryptionAlgorithm(encryption))
.Type<LocalUserBase>().Member(p=> p.ConnectString, x=> x.UseEncryptionAlgorithm(encryption))
.Type<SqliteUser>().Member(p=> p.ConnectString, x=> x.UseEncryptionAlgorithm(encryption))
.Type<MySqlUser>().Member(p=> p.ConnectString, x=> x.UseEncryptionAlgorithm(encryption))
.UseEncryptionAlgorithm()
 .Create();
IExtendedXmlSerializer serializer = new ConfigurationContainer()
.UseAutoFormatting()
.UseOptimizedNamespaces()
.UseEncryptionAlgorithm(encryption)
.Type<MySqlInfo>().Member(p=> p.Password, x=> x.Encrypt())
 .Type<LocalUserBase>().Member(p=> p.ConnectString, x=> x.Encrypt())
 .Type<SqliteUser>().Member(p=> p.ConnectString, x=> x.Encrypt())
.Type<MySqlUser>().Member(p=> p.ConnectString, x=> x.Encrypt())
.Create();

Once UseEncryptionAlgorithm is used, the data will not be encrypted

Testing the second method again succeeded.. Close this issue