### [Apq\.Cfg\.Crypto\.DataProtection](Apq.Cfg.Crypto.DataProtection.md 'Apq\.Cfg\.Crypto\.DataProtection').[DataProtectionCryptoProvider](Apq.Cfg.Crypto.DataProtection.DataProtectionCryptoProvider.md 'Apq\.Cfg\.Crypto\.DataProtection\.DataProtectionCryptoProvider') ## DataProtectionCryptoProvider\.Encrypt\(string\) Method 加密明文 ```csharp public string Encrypt(string plainText); ``` #### Parameters `plainText` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') 明文 Implements [Encrypt\(string\)](https://learn.microsoft.com/en-us/dotnet/api/apq.cfg.crypto.icryptoprovider.encrypt#apq-cfg-crypto-icryptoprovider-encrypt(system-string) 'Apq\.Cfg\.Crypto\.ICryptoProvider\.Encrypt\(System\.String\)') #### Returns [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') 加密后的字符串