convert personclass writer to xml document so we can encrypt.
This commit is contained in:
parent
490a8d1b04
commit
e4edd9bf5a
@ -182,7 +182,13 @@ namespace EduNetworkBuilder
|
||||
settings.NewLineOnAttributes = true;
|
||||
if (doRotation && File.Exists(filename))
|
||||
NB.MoveFileWithRotation(filename); //make a backup of the file
|
||||
XmlWriter writer = XmlWriter.Create(filename, settings);
|
||||
|
||||
//Generate a doc that has a writer attached. All the normal save funcs work with the writer,
|
||||
//But, we can encrypt the XmlDocument
|
||||
XmlDocument doc = new XmlDocument();
|
||||
using (XmlWriter writer = doc.CreateNavigator().AppendChild())
|
||||
{
|
||||
//XmlWriter writer = XmlWriter.Create(filename, settings);
|
||||
|
||||
//Now we write the file:
|
||||
writer.WriteStartDocument();
|
||||
@ -191,8 +197,8 @@ namespace EduNetworkBuilder
|
||||
Save(writer);
|
||||
writer.WriteEndElement();
|
||||
writer.WriteEndDocument();
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
}
|
||||
doc.Save(filename);
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,8 +140,6 @@ namespace EduNetworkBuilder
|
||||
//The decryption failed.
|
||||
throw new LoginException("Key/Salt unable to decrypt.");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected static string GenCharString(Random RanGen, int length)
|
||||
|
Loading…
Reference in New Issue
Block a user