System.Configuration.ProtectedConfigurationSection.EncryptSection C# (CSharp) Метод

EncryptSection() статический приватный Метод

static private EncryptSection ( string clearXml, ProtectedConfigurationProvider provider ) : string
clearXml string
provider ProtectedConfigurationProvider
Результат string
        internal static string EncryptSection(string clearXml, ProtectedConfigurationProvider provider) {
            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.PreserveWhitespace = true;
            xmlDocument.LoadXml(clearXml);
            string sectionName = xmlDocument.DocumentElement.Name;
            XmlNode encNode = provider.Encrypt(xmlDocument.DocumentElement);
            return encNode.OuterXml;
        }

Usage Example

Пример #1
0
		public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection)
		{
			if (protectedSection == null)
				throw new ArgumentNullException ("protectedSection");

			return protectedSection.EncryptSection (encryptedXml, protectionProvider);
		}
All Usage Examples Of System.Configuration.ProtectedConfigurationSection::EncryptSection