RSA.TryExportRSAPublicKeyPem(Span<Char>, Int32) 方法

定义

尝试将 PEM 编码的 PKCS#1 RSAPublicKey 格式中的当前密钥导出到提供的缓冲区中。

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

参数

destination
Span<Char>

用于接收 PEM 编码的 PKCS#1 RSAPublicKey 数据的字符范围。

charsWritten
Int32

此方法返回时,包含一个值,该值指示写入 destination的字符数。 该参数未经初始化即被处理。

返回

Boolean

如果 destination 具有足够的大小以接收输出,则为 true;否则为 false

例外

未能导出密钥。

注解

A PEM-encoded PKCS#1 RSAPublicKey will begin with -----BEGIN RSA PUBLIC KEY----- and end with -----END RSA PUBLIC KEY-----, with the base64 encoded DER contents of the key between the PEM boundaries.

          The PEM is encoded according to the IETF RFC 7468 "strict"
          encoding rules.

适用于