1
2
3
4
5
6
7
8
9
|
private string Decrypt(string _connectionString)
{
Regex r = new Regex(@"^.*?Password=(?<Password>[^;]*)(;|$)", RegexOptions.IgnoreCase);
string encrypted = r.Match(_connectionString).Groups["Password"].Value;
string decrypted = Decrypt(encrypted, key);
return _connectionString.Replace(encrypted, decrypted);
}
|