Initializes an System.Security.Cryptography.RSA object from the key information from an XML string.
- xmlString
- The XML string containing System.Security.Cryptography.RSA key information.
The RSA.FromXmlString(string) initializes an RSA object using key information in an XML string that was generated using the RSA.ToXmlString(bool) method. The RSA.FromXmlString(string) method accepts either an XML string containing a public key or an XML string containing a public and private key.
Use the RSA.FromXmlString(string) method to conveniently initialize System.Security.Cryptography.RSA key information.
Persisting an XML string containing a private key to an insecure location is a security threat. The security of your application can be compromised if a malicious third party can access your private key. To safely persist a private key, use a secure key container. For more information about persisting private keys in a key container, see How to: Store Asymmetric Keys in a Key Container.