Bewerken

Share via


X509Certificate2Collection.TryExportPkcs7Pem(Span<Char>, Int32) Method

Definition

Attempts to export the X.509 public certificates as a PKCS7 certificate collection, encoded as PEM.

public:
 bool TryExportPkcs7Pem(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public bool TryExportPkcs7Pem (Span<char> destination, out int charsWritten);
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
member this.TryExportPkcs7Pem : Span<char> * int -> bool
Public Function TryExportPkcs7Pem (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

Parameters

destination
Span<Char>

The buffer to receive the PEM encoded PKCS7 collection.

charsWritten
Int32

When this method returns, the total number of characters written to destination.

Returns

true if destination was large enough to receive PEM encoded PKCS7 certificate collection; otherwise, false.

Attributes

Exceptions

A certificate is corrupt, in an invalid state, or could not be exported to PEM.

Applies to