Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1480 lines (1333 sloc) 110 KB
<Type Name="AsymmetricAlgorithm" FullName="System.Security.Cryptography.AsymmetricAlgorithm">
<TypeSignature Language="C#" Value="public abstract class AsymmetricAlgorithm : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit AsymmetricAlgorithm extends System.Object implements class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:System.Security.Cryptography.AsymmetricAlgorithm" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class AsymmetricAlgorithm&#xA;Implements IDisposable" />
<TypeSignature Language="C++ CLI" Value="public ref class AsymmetricAlgorithm abstract : IDisposable" />
<TypeSignature Language="F#" Value="type AsymmetricAlgorithm = class&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the abstract base class from which all implementations of asymmetric algorithms must inherit.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Asymmetric cryptographic algorithms, also known as public-key algorithms, require that both sender and receiver maintain a pair of related keys: a private key and a public key. Both keys are unique to the entity. The public key can be made available to anyone; this key is used for encoding data that is sent to a receiver. The private key must be kept private by the receiver; this key is used for decoding messages encoded using the receiver's public key. The <xref:System.Security.Cryptography.RSACryptoServiceProvider> class is an implementation of a public-key algorithm. For an in-depth discussion of public-key encryption and algorithms, see the "Public-Key Encryption" section in [Cryptographic Services](~/docs/standard/security/cryptographic-services.md). For information about how to use the Strong Name tool (Sn.exe) to create key pairs, see [How to: Create a Public-Private Key Pair](~/docs/standard/assembly/create-public-private-key-pair.md).
You can use public-key systems to form digital signatures. Digital signatures are used to help to protect the integrity of data. For example, to use a public-key system to digitally sign a message, the sender first applies a hash function to the message to create a message digest. The sender then encrypts the message digest with the sender's private key to create the sender's personal signature. Upon receiving the message and signature, the receiver decrypts the signature using the sender's public key to recover the message digest and hashes the message using the same hash algorithm that the sender used. If the message digest that the receiver computes matches the message digest received from the sender, the receiver can assume that the message was not altered while in transit. Note that anyone can verify a signature, because the sender's public key is common knowledge. This technique does not retain the secrecy of the message; for the message to be secret, it must also be encrypted.
The .NET Framework provides the following classes that implement digital signature algorithms: <xref:System.Security.Cryptography.DSACryptoServiceProvider>, <xref:System.Security.Cryptography.RSACryptoServiceProvider>, <xref:System.Security.Cryptography.ECDsa> (base class), and <xref:System.Security.Cryptography.ECDsaCng>.
The <xref:System.Security.Cryptography> namespace provides concrete classes for <xref:System.Security.Cryptography.RSA> and <xref:System.Security.Cryptography.DSA> only.
To learn how to use the RSA algorithm to encrypt and decrypt XML data, and create and verify XML digital signatures, see these articles:
- [How to: Encrypt XML Elements with Asymmetric Keys](~/docs/standard/security/how-to-encrypt-xml-elements-with-asymmetric-keys.md)
- [How to: Decrypt XML Elements with Asymmetric Keys](~/docs/standard/security/how-to-decrypt-xml-elements-with-asymmetric-keys.md)
- [How to: Sign XML Documents with Digital Signatures](~/docs/standard/security/how-to-sign-xml-documents-with-digital-signatures.md)
- [How to: Verify the Digital Signatures of XML Documents](~/docs/standard/security/how-to-verify-the-digital-signatures-of-xml-documents.md)
## Examples
The following code example demonstrates how to implement a custom asymmetric algorithm inherited from the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class. An additional class is provided to demonstrate how to use the custom class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#2)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#2)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#2)]
Here's an additional class that demonstrates how to use the custom class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp#3)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#3)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#3)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
<related type="Article" href="https://msdn.microsoft.com/library/05026813-f3bd-4d7c-9e0b-fc588eb3d114">How to: Create a Public/Private Key Pair</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected AsymmetricAlgorithm ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; AsymmetricAlgorithm();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You cannot create an instance of an abstract class. Application code creates a new instance of a derived class. The <xref:System.Security.Cryptography.RSACryptoServiceProvider> and <xref:System.Security.Cryptography.DSACryptoServiceProvider> classes are the only currently supported implementations.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The implementation of the derived class is not valid.</exception>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Clear();" />
<MemberSignature Language="F#" Value="member this.Clear : unit -&gt; unit" Usage="asymmetricAlgorithm.Clear " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is a simple call to the <xref:System.IDisposable.Dispose%2A?displayProperty=nameWithType> method.
Calling `Dispose` allows the resources used by the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class to be reallocated for other purposes. For more information about `Dispose`, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md).
## Examples
The following code example demonstrates how to call the <xref:System.Security.Cryptography.AsymmetricAlgorithm.Clear%2A> method to release the resources of the current `customCrypto` object. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp#1)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#1)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<MemberGroup MemberName="Create">
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates a cryptographic object used to perform the asymmetric algorithm.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Create">
<MemberSignature Language="C#" Value="public static System.Security.Cryptography.AsymmetricAlgorithm Create ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Cryptography.AsymmetricAlgorithm Create() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.Create" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Create () As AsymmetricAlgorithm" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Security::Cryptography::AsymmetricAlgorithm ^ Create();" />
<MemberSignature Language="F#" Value="static member Create : unit -&gt; System.Security.Cryptography.AsymmetricAlgorithm" Usage="System.Security.Cryptography.AsymmetricAlgorithm.Create " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Security.SecuritySafeCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Security.Cryptography.AsymmetricAlgorithm</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a default cryptographic object used to perform the asymmetric algorithm.</summary>
<returns>A new <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> instance, unless the default settings have been changed with the [&lt;cryptoClass&gt; element](~/docs/framework/configure-apps/file-schema/cryptography/cryptoclass-element.md).</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to implement the <xref:System.Security.Cryptography.AsymmetricAlgorithm.Create%2A> method in an extended class. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#11](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#11)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#11](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#11)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#11](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#11)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="Create">
<MemberSignature Language="C#" Value="public static System.Security.Cryptography.AsymmetricAlgorithm Create (string algName);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Cryptography.AsymmetricAlgorithm Create(string algName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.Create(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Create (algName As String) As AsymmetricAlgorithm" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Security::Cryptography::AsymmetricAlgorithm ^ Create(System::String ^ algName);" />
<MemberSignature Language="F#" Value="static member Create : string -&gt; System.Security.Cryptography.AsymmetricAlgorithm" Usage="System.Security.Cryptography.AsymmetricAlgorithm.Create algName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Security.SecuritySafeCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Security.Cryptography.AsymmetricAlgorithm</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="algName" Type="System.String" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="algName">The asymmetric algorithm implementation to use. The following table shows the valid values for the <paramref name="algName" /> parameter and the algorithms they map to.
<list type="table"><listheader><term> Parameter value
</term><description> Implements
</description></listheader><item><term> System.Security.Cryptography.AsymmetricAlgorithm
</term><description><see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /></description></item><item><term> RSA
</term><description><see cref="T:System.Security.Cryptography.RSA" /></description></item><item><term> System.Security.Cryptography.RSA
</term><description><see cref="T:System.Security.Cryptography.RSA" /></description></item><item><term> DSA
</term><description><see cref="T:System.Security.Cryptography.DSA" /></description></item><item><term> System.Security.Cryptography.DSA
</term><description><see cref="T:System.Security.Cryptography.DSA" /></description></item><item><term> ECDsa
</term><description><see cref="T:System.Security.Cryptography.ECDsa" /></description></item><item><term> ECDsaCng
</term><description><see cref="T:System.Security.Cryptography.ECDsaCng" /></description></item><item><term> System.Security.Cryptography.ECDsaCng
</term><description><see cref="T:System.Security.Cryptography.ECDsaCng" /></description></item><item><term> ECDH
</term><description><see cref="T:System.Security.Cryptography.ECDiffieHellman" /></description></item><item><term> ECDiffieHellman
</term><description><see cref="T:System.Security.Cryptography.ECDiffieHellman" /></description></item><item><term> ECDiffieHellmanCng
</term><description><see cref="T:System.Security.Cryptography.ECDiffieHellmanCng" /></description></item><item><term> System.Security.Cryptography.ECDiffieHellmanCng
</term><description><see cref="T:System.Security.Cryptography.ECDiffieHellmanCng" /></description></item></list></param>
<summary>Creates an instance of the specified implementation of an asymmetric algorithm.</summary>
<returns>A new instance of the specified asymmetric algorithm implementation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to implement the <xref:System.Security.Cryptography.AsymmetricAlgorithm.Create%2A> method in an extended class. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#12](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#12)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#12](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#12)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#12](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#12)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<MemberGroup MemberName="Dispose">
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="asymmetricAlgorithm.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call `Dispose` when you are finished using the <xref:System.Security.Cryptography.AsymmetricAlgorithm>. The `Dispose` method leaves the <xref:System.Security.Cryptography.AsymmetricAlgorithm> in an unusable state. After calling `Dispose`, you must release all references to the <xref:System.Security.Cryptography.AsymmetricAlgorithm> so the garbage collector can reclaim the memory that the <xref:System.Security.Cryptography.AsymmetricAlgorithm> was occupying.
For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
> [!NOTE]
> Always call `Dispose` before you release your last reference to the <xref:System.Security.Cryptography.AsymmetricAlgorithm>. Otherwise, the resources it is using will not be freed until the garbage collector calls the <xref:System.Security.Cryptography.AsymmetricAlgorithm> object's `Finalize` method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void Dispose(bool disposing);" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -&gt; unit&#xA;override this.Dispose : bool -&gt; unit" Usage="asymmetricAlgorithm.Dispose disposing" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C#" Value="protected abstract void Dispose (bool disposing);" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Sub Dispose (disposing As Boolean)" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; abstract void Dispose(bool disposing);" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -&gt; unit" Usage="asymmetricAlgorithm.Dispose disposing" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class and optionally releases the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called by the public `Dispose()` method and the `Finalize` method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. `Finalize` invokes `Dispose` with `disposing` set to `false`.
When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this <xref:System.Security.Cryptography.AsymmetricAlgorithm> references. This method invokes the `Dispose()` method of each referenced object.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>
<see langword="Dispose" /> can be called multiple times by other objects. When overriding <see langword="Dispose(Boolean)" />, be careful not to reference objects that have been previously disposed in an earlier call to <see langword="Dispose" />. For more information about how to implement <see langword="Dispose(Boolean)" />, see [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
For more information about <see langword="Dispose" /> and <see langword="Finalize" />, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md).</para>
</block>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="ExportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual byte[] ExportEncryptedPkcs8PrivateKey (ReadOnlySpan&lt;byte&gt; passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] ExportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; passwordBytes, class System.Security.Cryptography.PbeParameters pbeParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual cli::array &lt;System::Byte&gt; ^ ExportEncryptedPkcs8PrivateKey(ReadOnlySpan&lt;System::Byte&gt; passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters);" />
<MemberSignature Language="F#" Value="abstract member ExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * System.Security.Cryptography.PbeParameters -&gt; byte[]&#xA;override this.ExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * System.Security.Cryptography.PbeParameters -&gt; byte[]" Usage="asymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey (passwordBytes, pbeParameters)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="passwordBytes" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="pbeParameters" Type="System.Security.Cryptography.PbeParameters" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
<summary>Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password.</summary>
<returns>A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The password bytes are passed directly into the Key Derivation Function (KDF) used by the algorithm indicated by `pbeParameters`.
This enables compatibility with other systems which use a text encoding other than UTF-8 when processing passwords with PBKDF2 (Password-Based Key Derivation Function 2).
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.
-or-
<paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.
</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey" />
</Docs>
</Member>
<Member MemberName="ExportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual byte[] ExportEncryptedPkcs8PrivateKey (ReadOnlySpan&lt;char&gt; password, System.Security.Cryptography.PbeParameters pbeParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] ExportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;char&gt; password, class System.Security.Cryptography.PbeParameters pbeParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual cli::array &lt;System::Byte&gt; ^ ExportEncryptedPkcs8PrivateKey(ReadOnlySpan&lt;char&gt; password, System::Security::Cryptography::PbeParameters ^ pbeParameters);" />
<MemberSignature Language="F#" Value="abstract member ExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;char&gt; * System.Security.Cryptography.PbeParameters -&gt; byte[]&#xA;override this.ExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;char&gt; * System.Security.Cryptography.PbeParameters -&gt; byte[]" Usage="asymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey (password, pbeParameters)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="password" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="pbeParameters" Type="System.Security.Cryptography.PbeParameters" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="password">The password to use when encrypting the key material.</param>
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
<summary>Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password.</summary>
<returns>A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When `pbeParameters` indicates an algorithm that uses PBKDF2 (Password-Based Key Derivation Function 2), the password is converted to bytes via the UTF-8 encoding.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey" />
</Docs>
</Member>
<Member MemberName="ExportPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual byte[] ExportPkcs8PrivateKey ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] ExportPkcs8PrivateKey() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ExportPkcs8PrivateKey" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function ExportPkcs8PrivateKey () As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual cli::array &lt;System::Byte&gt; ^ ExportPkcs8PrivateKey();" />
<MemberSignature Language="F#" Value="abstract member ExportPkcs8PrivateKey : unit -&gt; byte[]&#xA;override this.ExportPkcs8PrivateKey : unit -&gt; byte[]" Usage="asymmetricAlgorithm.ExportPkcs8PrivateKey " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Exports the current key in the PKCS#8 PrivateKeyInfo format.</summary>
<returns>A byte array containing the PKCS#8 PrivateKeyInfo representation of this key.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey" />
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.TryExportPkcs8PrivateKey" />
</Docs>
</Member>
<Member MemberName="ExportSubjectPublicKeyInfo">
<MemberSignature Language="C#" Value="public virtual byte[] ExportSubjectPublicKeyInfo ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] ExportSubjectPublicKeyInfo() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ExportSubjectPublicKeyInfo" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function ExportSubjectPublicKeyInfo () As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual cli::array &lt;System::Byte&gt; ^ ExportSubjectPublicKeyInfo();" />
<MemberSignature Language="F#" Value="abstract member ExportSubjectPublicKeyInfo : unit -&gt; byte[]&#xA;override this.ExportSubjectPublicKeyInfo : unit -&gt; byte[]" Usage="asymmetricAlgorithm.ExportSubjectPublicKeyInfo " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format.</summary>
<returns>A byte array containing the X.509 SubjectPublicKeyInfo representation of the public-key portion of this key.</returns>
<remarks>To be added.</remarks>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.TryExportSubjectPublicKeyInfo" />
</Docs>
</Member>
<Member MemberName="FromXmlString">
<MemberSignature Language="C#" Value="public virtual void FromXmlString (string xmlString);" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void FromXmlString(string xmlString) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.FromXmlString(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub FromXmlString (xmlString As String)" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void FromXmlString(System::String ^ xmlString);" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="abstract member FromXmlString : string -&gt; unit&#xA;override this.FromXmlString : string -&gt; unit" Usage="asymmetricAlgorithm.FromXmlString xmlString" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C#" Value="public abstract void FromXmlString (string xmlString);" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Sub FromXmlString (xmlString As String)" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract void FromXmlString(System::String ^ xmlString);" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="F#" Value="abstract member FromXmlString : string -&gt; unit" Usage="asymmetricAlgorithm.FromXmlString xmlString" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xmlString" Type="System.String" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="xmlString">The XML string to use to reconstruct the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object.</param>
<summary>When overridden in a derived class, reconstructs an <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object from an XML string. Otherwise, throws a <see cref="T:System.NotImplementedException" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to implement the <xref:System.Security.Cryptography.AsymmetricAlgorithm.FromXmlString%2A> method to parse the specified XML string to populate the current <xref:System.Security.Cryptography.CspParameters> object. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#4](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#4)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#4)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#4)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="ImportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual void ImportEncryptedPkcs8PrivateKey (ReadOnlySpan&lt;byte&gt; passwordBytes, ReadOnlySpan&lt;byte&gt; source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; passwordBytes, valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; source, [out] int32&amp; bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ImportEncryptedPkcs8PrivateKey (passwordBytes As ReadOnlySpan(Of Byte), source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ImportEncryptedPkcs8PrivateKey(ReadOnlySpan&lt;System::Byte&gt; passwordBytes, ReadOnlySpan&lt;System::Byte&gt; source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberSignature Language="F#" Value="abstract member ImportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * ReadOnlySpan&lt;byte&gt; * int -&gt; unit&#xA;override this.ImportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * ReadOnlySpan&lt;byte&gt; * int -&gt; unit" Usage="asymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey (passwordBytes, source, bytesRead)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="passwordBytes" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="source" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" Index="2" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="passwordBytes">The bytes to use as a password when decrypting the key material.</param>
<param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>When overridden in a derived class, imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The password bytes are passed directly into the Key Derivation Function (KDF) used by the algorithm indicated by `pbeParameters`.
This enables compatibility with other systems which use a text encoding other than UTF-8 when processing passwords with PBKDF2 (Password-Based Key Derivation Function 2).
This method only supports the binary (BER/CER/DER) encoding of EncryptedPrivateKeyInfo.
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
-or-
The contents of <paramref name="source" /> indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires <see cref="T:System.Char" />-based passwords.
-or-
The contents of <paramref name="source" /> do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.
-or-
The contents of <paramref name="source" /> indicate the key is for an algorithm other than the algorithm represented by this instance.
-or-
The contents of <paramref name="source" /> represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
</Docs>
</Member>
<Member MemberName="ImportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual void ImportEncryptedPkcs8PrivateKey (ReadOnlySpan&lt;char&gt; password, ReadOnlySpan&lt;byte&gt; source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;char&gt; password, valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; source, [out] int32&amp; bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ImportEncryptedPkcs8PrivateKey (password As ReadOnlySpan(Of Char), source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ImportEncryptedPkcs8PrivateKey(ReadOnlySpan&lt;char&gt; password, ReadOnlySpan&lt;System::Byte&gt; source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberSignature Language="F#" Value="abstract member ImportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;char&gt; * ReadOnlySpan&lt;byte&gt; * int -&gt; unit&#xA;override this.ImportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;char&gt; * ReadOnlySpan&lt;byte&gt; * int -&gt; unit" Usage="asymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey (password, source, bytesRead)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="password" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="source" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" Index="2" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="password">The password to use for decrypting the key material.</param>
<param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>When overridden in a derived class, imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the contents of `source` indicate an algorithm that uses PBKDF1 (Password-Based Key Derivation Function 1) or PBKDF2 (Password-Based Key Derivation Function 2), the password is converted to bytes via the UTF-8 encoding.
This method only supports the binary (BER/CER/DER) encoding of EncryptedPrivateKeyInfo.
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
-or-
The contents of <paramref name="source" /> do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.
-or-
The contents of <paramref name="source" /> indicate the key is for an algorithm other than the algorithm represented by this instance.
-or-
The contents of <paramref name="source" /> represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
</Docs>
</Member>
<Member MemberName="ImportPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual void ImportPkcs8PrivateKey (ReadOnlySpan&lt;byte&gt; source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; source, [out] int32&amp; bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ImportPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ImportPkcs8PrivateKey (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ImportPkcs8PrivateKey(ReadOnlySpan&lt;System::Byte&gt; source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberSignature Language="F#" Value="abstract member ImportPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * int -&gt; unit&#xA;override this.ImportPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * int -&gt; unit" Usage="asymmetricAlgorithm.ImportPkcs8PrivateKey (source, bytesRead)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="source">The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>When overriden in a derived class, imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method only supports the binary (BER/CER/DER) encoding of PrivateKeyInfo.
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The contents of <paramref name="source" /> do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure.
-or-
The contents of <paramref name="source" /> indicate the key is for an algorithm other than the algorithm represented by this instance.
-or-
The contents of <paramref name="source" /> represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
</Docs>
</Member>
<Member MemberName="ImportSubjectPublicKeyInfo">
<MemberSignature Language="C#" Value="public virtual void ImportSubjectPublicKeyInfo (ReadOnlySpan&lt;byte&gt; source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportSubjectPublicKeyInfo(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; source, [out] int32&amp; bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ImportSubjectPublicKeyInfo(System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ImportSubjectPublicKeyInfo(ReadOnlySpan&lt;System::Byte&gt; source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberSignature Language="F#" Value="abstract member ImportSubjectPublicKeyInfo : ReadOnlySpan&lt;byte&gt; * int -&gt; unit&#xA;override this.ImportSubjectPublicKeyInfo : ReadOnlySpan&lt;byte&gt; * int -&gt; unit" Usage="asymmetricAlgorithm.ImportSubjectPublicKeyInfo (source, bytesRead)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="source">The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>When overriden in a derived class, imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method only supports the binary (DER) encoding of SubjectPublicKeyInfo.
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportSubjectPublicKeyInfo%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The contents of <paramref name="source" /> do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.
-or-
The contents of <paramref name="source" /> indicate the key is for an algorithm other than the algorithm represented by this instance.
-or-
The contents of <paramref name="source" /> represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
</Docs>
</Member>
<Member MemberName="KeyExchangeAlgorithm">
<MemberSignature Language="C#" Value="public virtual string KeyExchangeAlgorithm { get; }" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".property instance string KeyExchangeAlgorithm" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.AsymmetricAlgorithm.KeyExchangeAlgorithm" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property KeyExchangeAlgorithm As String" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ KeyExchangeAlgorithm { System::String ^ get(); };" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="member this.KeyExchangeAlgorithm : string" Usage="System.Security.Cryptography.AsymmetricAlgorithm.KeyExchangeAlgorithm" />
<MemberSignature Language="C#" Value="public abstract string KeyExchangeAlgorithm { get; }" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property KeyExchangeAlgorithm As String" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::String ^ KeyExchangeAlgorithm { System::String ^ get(); };" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>When overridden in a derived class, gets the name of the key exchange algorithm. Otherwise, throws an <see cref="T:System.NotImplementedException" />.</summary>
<value>The name of the key exchange algorithm.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to override the <xref:System.Security.Cryptography.AsymmetricAlgorithm.KeyExchangeAlgorithm%2A> property to return the name for the key exchange algorithm. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#6](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#6)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#6)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#6)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="KeySize">
<MemberSignature Language="C#" Value="public virtual int KeySize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 KeySize" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.AsymmetricAlgorithm.KeySize" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property KeySize As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property int KeySize { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.KeySize : int with get, set" Usage="System.Security.Cryptography.AsymmetricAlgorithm.KeySize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.</summary>
<value>The size, in bits, of the key modulus used by the asymmetric algorithm.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The valid key sizes are specified by the particular implementation of the asymmetric algorithm and are listed in the <xref:System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizes%2A> property.
## Examples
The following code example demonstrates how to override the <xref:System.Security.Cryptography.AsymmetricAlgorithm.KeySize%2A> property to verify that it falls within the range identified in the local `keySizes` member variable. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#9](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#9)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#9](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#9)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#9](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#9)]
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key modulus size is invalid.</exception>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="KeySizeValue">
<MemberSignature Language="C#" Value="protected int KeySizeValue;" />
<MemberSignature Language="ILAsm" Value=".field family int32 KeySizeValue" />
<MemberSignature Language="DocId" Value="F:System.Security.Cryptography.AsymmetricAlgorithm.KeySizeValue" />
<MemberSignature Language="VB.NET" Value="Protected KeySizeValue As Integer " />
<MemberSignature Language="C++ CLI" Value="protected: int KeySizeValue;" />
<MemberSignature Language="F#" Value="val mutable KeySizeValue : int" Usage="System.Security.Cryptography.AsymmetricAlgorithm.KeySizeValue" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Represents the size, in bits, of the key modulus used by the asymmetric algorithm.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The valid key sizes are specified by the particular implementation of the asymmetric algorithm and are listed in the <xref:System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizes%2A> property.
This field is accessed through the <xref:System.Security.Cryptography.AsymmetricAlgorithm.KeySize%2A> property.
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="LegalKeySizes">
<MemberSignature Language="C#" Value="public virtual System.Security.Cryptography.KeySizes[] LegalKeySizes { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Security.Cryptography.KeySizes[] LegalKeySizes" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizes" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property LegalKeySizes As KeySizes()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property cli::array &lt;System::Security::Cryptography::KeySizes ^&gt; ^ LegalKeySizes { cli::array &lt;System::Security::Cryptography::KeySizes ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LegalKeySizes : System.Security.Cryptography.KeySizes[]" Usage="System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizes" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Cryptography.KeySizes[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the key sizes that are supported by the asymmetric algorithm.</summary>
<value>An array that contains the key sizes supported by the asymmetric algorithm.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The asymmetric algorithm supports only key sizes that match an entry in this array.
## Examples
The following code example demonstrates how to call the <xref:System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizes%2A> property to retrieve the <xref:System.Security.Cryptography.KeySizes.MinSize%2A>, <xref:System.Security.Cryptography.KeySizes.MaxSize%2A>, and <xref:System.Security.Cryptography.KeySizes.SkipSize%2A> properties. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#10](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp#10)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#10](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#10)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#10](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#10)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="LegalKeySizesValue">
<MemberSignature Language="C#" Value="protected System.Security.Cryptography.KeySizes[] LegalKeySizesValue;" />
<MemberSignature Language="ILAsm" Value=".field family class System.Security.Cryptography.KeySizes[] LegalKeySizesValue" />
<MemberSignature Language="DocId" Value="F:System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizesValue" />
<MemberSignature Language="VB.NET" Value="Protected LegalKeySizesValue As KeySizes() " />
<MemberSignature Language="C++ CLI" Value="protected: cli::array &lt;System::Security::Cryptography::KeySizes ^&gt; ^ LegalKeySizesValue;" />
<MemberSignature Language="F#" Value="val mutable LegalKeySizesValue : System.Security.Cryptography.KeySizes[]" Usage="System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizesValue" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Cryptography.KeySizes[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies the key sizes that are supported by the asymmetric algorithm.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The asymmetric algorithm supports only key sizes that match an entry in this array.
This field is accessed through the <xref:System.Security.Cryptography.AsymmetricAlgorithm.LegalKeySizes%2A> property.
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="SignatureAlgorithm">
<MemberSignature Language="C#" Value="public virtual string SignatureAlgorithm { get; }" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".property instance string SignatureAlgorithm" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.AsymmetricAlgorithm.SignatureAlgorithm" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property SignatureAlgorithm As String" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ SignatureAlgorithm { System::String ^ get(); };" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="member this.SignatureAlgorithm : string" Usage="System.Security.Cryptography.AsymmetricAlgorithm.SignatureAlgorithm" />
<MemberSignature Language="C#" Value="public abstract string SignatureAlgorithm { get; }" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property SignatureAlgorithm As String" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::String ^ SignatureAlgorithm { System::String ^ get(); };" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>When implemented in a derived class, gets the name of the signature algorithm. Otherwise, always throws a <see cref="T:System.NotImplementedException" />.</summary>
<value>The name of the signature algorithm.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to override the <xref:System.Security.Cryptography.AsymmetricAlgorithm.SignatureAlgorithm%2A> property to return the name of the signature algorithm. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#7](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#7)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#7](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#7)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#7](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#7)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="System.IDisposable.Dispose">
<MemberSignature Language="C#" Value="void IDisposable.Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.IDisposable.Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.System#IDisposable#Dispose" />
<MemberSignature Language="VB.NET" Value="Sub Dispose () Implements IDisposable.Dispose" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.IDisposable.Dispose() = IDisposable::Dispose;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>For a description of this member, see <see cref="M:System.IDisposable.Dispose" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Security.Cryptography.AsymmetricAlgorithm> instance is cast to an <xref:System.IDisposable> interface.
]]></format>
</remarks>
<forInternalUseOnly />
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="ToXmlString">
<MemberSignature Language="C#" Value="public virtual string ToXmlString (bool includePrivateParameters);" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string ToXmlString(bool includePrivateParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.ToXmlString(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function ToXmlString (includePrivateParameters As Boolean) As String" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::String ^ ToXmlString(bool includePrivateParameters);" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="abstract member ToXmlString : bool -&gt; string&#xA;override this.ToXmlString : bool -&gt; string" Usage="asymmetricAlgorithm.ToXmlString includePrivateParameters" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C#" Value="public abstract string ToXmlString (bool includePrivateParameters);" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ToXmlString (includePrivateParameters As Boolean) As String" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract System::String ^ ToXmlString(bool includePrivateParameters);" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="F#" Value="abstract member ToXmlString : bool -&gt; string" Usage="asymmetricAlgorithm.ToXmlString includePrivateParameters" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="includePrivateParameters" Type="System.Boolean" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="includePrivateParameters">
<see langword="true" /> to include private parameters; otherwise, <see langword="false" />.</param>
<summary>When overridden in a derived class, creates and returns an XML string representation of the current <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object. Otherwise, throws a <see cref="T:System.NotImplementedException" />.</summary>
<returns>An XML string encoding of the current <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to call the <xref:System.Security.Cryptography.AsymmetricAlgorithm.ToXmlString%2A> method to create an XML representation of the parameters in the current <xref:System.Security.Cryptography.AsymmetricAlgorithm> object. This code example is part of a larger example provided for the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class.
[!code-cpp[System.Security.Cryptography.AsymmetricAlgorithm#5](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp#5)]
[!code-csharp[System.Security.Cryptography.AsymmetricAlgorithm#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/CS/customcrypto.cs#5)]
[!code-vb[System.Security.Cryptography.AsymmetricAlgorithm#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb#5)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="TryExportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual bool TryExportEncryptedPkcs8PrivateKey (ReadOnlySpan&lt;byte&gt; passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, Span&lt;byte&gt; destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TryExportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; passwordBytes, class System.Security.Cryptography.PbeParameters pbeParameters, valuetype System.Span`1&lt;unsigned int8&gt; destination, [out] int32&amp; bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan&lt;System::Byte&gt; passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span&lt;System::Byte&gt; destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberSignature Language="F#" Value="abstract member TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * System.Security.Cryptography.PbeParameters * Span&lt;byte&gt; * int -&gt; bool&#xA;override this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;byte&gt; * System.Security.Cryptography.PbeParameters * Span&lt;byte&gt; * int -&gt; bool" Usage="asymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey (passwordBytes, pbeParameters, destination, bytesWritten)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="passwordBytes" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="pbeParameters" Type="System.Security.Cryptography.PbeParameters" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="destination" Type="System.Span&lt;System.Byte&gt;" Index="2" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
<param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>When overridden in a derived class, attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The password bytes are passed directly into the Key Derivation Function (KDF) used by the algorithm indicated by `pbeParameters`.
This enables compatibility with other systems which use a text encoding other than UTF-8 when processing passwords with PBKDF2 (Password-Based Key Derivation Function 2).
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.
-or-
<paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.
</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey" />
</Docs>
</Member>
<Member MemberName="TryExportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual bool TryExportEncryptedPkcs8PrivateKey (ReadOnlySpan&lt;char&gt; password, System.Security.Cryptography.PbeParameters pbeParameters, Span&lt;byte&gt; destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TryExportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1&lt;char&gt; password, class System.Security.Cryptography.PbeParameters pbeParameters, valuetype System.Span`1&lt;unsigned int8&gt; destination, [out] int32&amp; bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan&lt;char&gt; password, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span&lt;System::Byte&gt; destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberSignature Language="F#" Value="abstract member TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;char&gt; * System.Security.Cryptography.PbeParameters * Span&lt;byte&gt; * int -&gt; bool&#xA;override this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan&lt;char&gt; * System.Security.Cryptography.PbeParameters * Span&lt;byte&gt; * int -&gt; bool" Usage="asymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey (password, pbeParameters, destination, bytesWritten)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="password" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="pbeParameters" Type="System.Security.Cryptography.PbeParameters" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="destination" Type="System.Span&lt;System.Byte&gt;" Index="2" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="3" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="password">The password to use when encrypting the key material.</param>
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
<param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>When overriden in a derived class, attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When `pbeParameters` indicates an algorithm that uses PBKDF2 (Password-Based Key Derivation Function 2), the password is converted to bytes via the UTF-8 encoding.
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey" />
</Docs>
</Member>
<Member MemberName="TryExportPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public virtual bool TryExportPkcs8PrivateKey (Span&lt;byte&gt; destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TryExportPkcs8PrivateKey(valuetype System.Span`1&lt;unsigned int8&gt; destination, [out] int32&amp; bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.TryExportPkcs8PrivateKey(System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function TryExportPkcs8PrivateKey (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool TryExportPkcs8PrivateKey(Span&lt;System::Byte&gt; destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberSignature Language="F#" Value="abstract member TryExportPkcs8PrivateKey : Span&lt;byte&gt; * int -&gt; bool&#xA;override this.TryExportPkcs8PrivateKey : Span&lt;byte&gt; * int -&gt; bool" Usage="asymmetricAlgorithm.TryExportPkcs8PrivateKey (destination, bytesWritten)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="destination" Type="System.Span&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="destination">The byte span to receive the PKCS#8 PrivateKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>When overridden in a derived class, attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportPkcs8PrivateKey" />
</Docs>
</Member>
<Member MemberName="TryExportSubjectPublicKeyInfo">
<MemberSignature Language="C#" Value="public virtual bool TryExportSubjectPublicKeyInfo (Span&lt;byte&gt; destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TryExportSubjectPublicKeyInfo(valuetype System.Span`1&lt;unsigned int8&gt; destination, [out] int32&amp; bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.AsymmetricAlgorithm.TryExportSubjectPublicKeyInfo(System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function TryExportSubjectPublicKeyInfo (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool TryExportSubjectPublicKeyInfo(Span&lt;System::Byte&gt; destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberSignature Language="F#" Value="abstract member TryExportSubjectPublicKeyInfo : Span&lt;byte&gt; * int -&gt; bool&#xA;override this.TryExportSubjectPublicKeyInfo : Span&lt;byte&gt; * int -&gt; bool" Usage="asymmetricAlgorithm.TryExportSubjectPublicKeyInfo (destination, bytesWritten)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="destination" Type="System.Span&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="destination">The byte span to receive the X.509 SubjectPublicKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>When overridden in a derived class, attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportSubjectPublicKeyInfo%2A> throws a <xref:System.NotImplementedException> by default.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportSubjectPublicKeyInfo" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.