Example #1
0
 public static string DecryptText(EncryptedTextContainer t, string pw)
 {
     using (var e = new EncryptedText(pw, t.Salt))
     {
         return(e.Decrypt(t.Data));
     }
 }
Example #2
0
 public static EncryptedTextContainer EncryptText(string t, string pw)
 {
     using (EncryptedText e = new EncryptedText(pw))
     {
         return(new EncryptedTextContainer()
         {
             Data = e.Encrypt(t), Salt = e.Salt
         });
     }
 }