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