MLDsa.ExportPkcs8PrivateKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Exports the current key in the PKCS#8 PrivateKeyInfo format.
public:
cli::array <System::Byte> ^ ExportPkcs8PrivateKey();
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] ExportPkcs8PrivateKey();
public byte[] ExportPkcs8PrivateKey();
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.ExportPkcs8PrivateKey : unit -> byte[]
member this.ExportPkcs8PrivateKey : unit -> byte[]
Public Function ExportPkcs8PrivateKey () As Byte()
Returns
A byte array containing the PKCS#8 PrivateKeyInfo representation of the this key.
- Attributes
Exceptions
This instance has been disposed.
This instance only represents a public key.
-or-
The private key is not exportable.
-or-
An error occurred while exporting the key.