RSA.TryExportRSAPrivateKey(Span<Byte>, Int32) 方法

定义

尝试以 PKCS#1 RSAPrivateKey 格式将当前密钥导入所提供的缓冲区。

public:
 virtual bool TryExportRSAPrivateKey(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TryExportRSAPrivateKey (Span<byte> destination, out int bytesWritten);
abstract member TryExportRSAPrivateKey : Span<byte> * int -> bool
override this.TryExportRSAPrivateKey : Span<byte> * int -> bool
Public Overridable Function TryExportRSAPrivateKey (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

参数

destination
Span<Byte>

用于接收 PKCS#1 RSAPrivateKey 数据的字节范围。

bytesWritten
Int32

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

返回

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

例外

未能导出密钥。

适用于

另请参阅