Example #1
0
 public CryptInfo ReturnInfo()
 {
     CryptInfo ci = new CryptInfo();
     string xml = ReturnKeys();
     XmlDocument document = new XmlDocument();
     document.LoadXml(xml);
     ci.Password = document.DocumentElement.SelectSingleNode("//P").InnerXml;
     ci.Salt = document.DocumentElement.SelectSingleNode("//Q").InnerText;
     ci.Vector = document.DocumentElement.SelectSingleNode("//D").InnerText.Substring(0, 16);
     return ci;
 }
Example #2
0
 public string Encrypt(string PlainText, CryptInfo ci, int KeySize = 256, string EncryptionMethod = CryptMethod.SHA1, int PassIterations = 2)
 {
     return AESEncryption.Encrypt(PlainText, ci.Password, ci.Salt, EncryptionMethod, PassIterations, ci.Vector, KeySize);
 }